In the above fiddle, it says the semicolon at the end of the line is unexpected. How so?
alert('foo');
alert('bar');
In the above fiddle, it says the semicolon at the end of the line is unexpected. How so?
alert('foo');
alert('bar');
The character you have there is not a semicolon (character code 59), but a "Greek Question Mark", character code 894.
console.log(';'.charCodeAt()); // Greek
console.log(';'.charCodeAt()); // Normal
Use the regular ;
semicolon instead.
The character on the first line is not a semicolon, it's a Greek question mark.
;
The first character is not actually a semicolon, it's a Greek question mark, U+037E
/ ;
/ ;
/ %CD%BE
Greek question mark: ;
Semicolon: ;
The difference is barely noticeable though.
This works:
alert('foo');
alert('bar');