Used to represent laughter, especially triumphal or cackling laughter such as that uttered by a villainous character in a cartoon or comic strip.
1980s: imitative, on the pattern of ha ha.