Considering you have reserved a nice side note for a comment I wrote I will explain my comment.
The reason I downvoted your question and added my comment is because I indeed googled your exact error message and the first result on the page came up with the semicolon issue.
Does googling for the error message and getting a solution for another case has anything to do with considering it as a bad question
It shows lack of (any) effort.
And now you are saying: "I knew it was the semicolon, I asked about why it does it!"
Well let me do the same thing I did yesterday and see what the first result comes up with:
http://stackoverflow.com/search?q=javascript+semicolonhttps://stackoverflow.com/search?q=javascript+semicolon
Which results in this answerthis answer with... your exact problem including an explanation.
So again (imho): serious lack of effort.