qadenza
qadenza

Reputation: 9293

Invalid or unexpected token on a very simple function

what is wrong here:

$('#evclose').click(function(){
    console.log('323');
});​ // line 103

console:

Uncaught SyntaxError: Invalid or unexpected token... commona.js103

when I delete the entire function error does not appear.

Upvotes: 4

Views: 36799

Answers (1)

DexJ
DexJ

Reputation: 1264

Just a non-ascii-character \xe2 at the end of your function braces.

Open developer tool > console and paste your code. You will see a red dot over there which indicates an invalid character.

Just remove that invalid character (check image below).

enter image description here

Upvotes: 18

Related Questions