No visible cause for “Unexpected token ILLEGAL”

后端 未结 11 2250
轻奢々
轻奢々 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:02

    I had the same problem on my mac and found it was because the Mac was replacing the standard quotes with curly quotes which are illegal javascript characters.

    To fix this I had to change the settings on my mac System Preferences=>Keyboard=>Text(tab) uncheck use smart quotes and dashes (default was checked).

提交回复
热议问题