No visible cause for “Unexpected token ILLEGAL”

后端 未结 11 2233
轻奢々
轻奢々 2020-11-22 00:09

I\'m getting this JavaScript error on my console:

Uncaught SyntaxError: Unexpected token ILLEGAL

This is my code:

11条回答
  •  旧巷少年郎
    2020-11-22 01:05

    I had this same problem and it occurred because I had hit the enter key when adding code in a text string.

    Because it was a long string of text I wanted to see it all without having to scroll in my text editor, however hitting enter added an invisible character to the string which was illegal. I was using Sublime Text as my editor.

提交回复
热议问题