Despite advice to the contrary, Javascript is a line oriented language and you only need the semicolon if you intend to stack a second statement on the same line (kind of like colons in BASIC)
Yeah, I know that's blasphemy, but it's also true: Javascript works just fine WITHOUT all the extra semicolons. The semicolons are only needed in the minds of those who have been misled to believe that they are. One should learn what JS thinks are complete statements -- where to wrap longer statements without causing an error -- as Javascript WILL end statements without semicolons. Better to just never use semicolons in the first place.