I\'m getting this JavaScript error on my console:
Uncaught SyntaxError: Unexpected token ILLEGAL
This is my code:
This also could be happening if you're copying code from another document (like a PDF) into your console and trying to run it.
I was trying to run some example code out of a Javascript book I'm reading and was surprised it didn't run in the console.
Apparently, copying from the PDF introduces some unexpected, illegal, and invisible characters into the code.