Right now, only a few files have the 'use strict' directive. I am not entirely sure why this isn't resulting in error like the following:
λ node --version
v4.0.0
λ echo let a = 1 > test-node4.js
λ node test-node4.js
E:\Projects\experiments\test-node4.js:1
(function (exports, require, module, __filename, __dirname) { let a = 1
^^^
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:413:25)
at Object.Module._extensions..js (module.js:452:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:475:10)
at startup (node.js:117:18)
at node.js:951:3
Right now, only a few files have the
'use strict'
directive. I am not entirely sure why this isn't resulting in error like the following:This enables strict mode in all js files.