期待";" 在javascript .js文件?

Van*_* Ig 0 javascript

我不确定发生了什么.当我在声明变量时只得到错误.如果我使用像console.log("嘿")这样的东西,它运行得很好.

'use strict';


$(document).ready(function() 
{
   Let number;

   console.log("Hey");

});
Run Code Online (Sandbox Code Playgroud)

Dan*_*ger 7

我认为这是因为你正在资本化let.

尝试小写,因为JavaScript区分大小写,即

'use strict';

$(document).ready(function() {
   let number;

   console.log("Hey");
});
Run Code Online (Sandbox Code Playgroud)