Scratch-JS icon indicating copy to clipboard operation
Scratch-JS copied to clipboard

Add "High compliancy" mode

Open ova2 opened this issue 10 years ago • 0 comments

Please add "High compliancy" mode as in Babel (checkbox here https://babeljs.io/repl/). Currently this ES6 code

if (true) {
  console.log(typeof value);  // ReferenceError!  
  let value = "blue";         // Temporal Dead Zone
}

is transpiled to

"use strict";

if (true) {
  console.log(typeof value);  // ReferenceError!
  var value = "blue";         // Temporal Dead Zone
}

and does not throw ReferenceError.

ova2 avatar Feb 18 '16 20:02 ova2