Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 出现错误:jshint 中未转义的“-”
第 3 行:var iChars = "!@#$%^&*+=[]\\\;{}|\":<>?"; 擒纵机构不良。
var iChars = "!@#$%^&*+=[]\\\;{}|\":<>?";
;不需要转义,所以\;是一个糟糕的转义序列。
;
\;
var iChars = "!@#$%^&*+=[]\\\;{}|\":<>?"; // ^--- this backslash is the problem
只需删除之前的反斜杠;:
var iChars = "!@#$%^&*+=[]\\;{}|\":<>?";
我想你不需要\\\,只是\\。
\\\
\\