
在上面的小提琴中,它表示该行末尾的分号是意外的。为何如此?
alert('foo')?
alert('bar');Run Code Online (Sandbox Code Playgroud)
您在那里拥有的字符不是分号(字符代码 59),而是“希腊问号”,字符代码 894。
console.log('?'.charCodeAt()); // Greek
console.log(';'.charCodeAt()); // NormalRun Code Online (Sandbox Code Playgroud)
请改用常规;分号。
| 归档时间: |
|
| 查看次数: |
82 次 |
| 最近记录: |