Малко хелп с WebStorm
Здравейте!
Как да реша този проблем
function expr() { let val = (30 + 25) / 3 * (35 - 14 - 12) let valSquare = val * val console.log(valSquare) } expr();
и след Shift+F10
"C:\Program Files (x86)\JetBrains\WebStorm 11.0\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" 1.js
c:\Users\Misho&Mecho\Desktop\untitled\1.js:3
let val = (30 + 25) / 3 * (35 - 14 - 12)
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
at node.js:968:3
Process finished with exit code 1
Ако го променя всичко е ок
function expr() { "use strict" let val = (30 + 25) / 3 * (35 - 14 - 12) let valSquare = val * val console.log(valSquare) } expr();
"C:\Program Files (x86)\JetBrains\WebStorm 11.0\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" 1.js
27225
Process finished with exit code 0