Sha256: 788b1d5058c90015705cc788173d63522324600aa83e99bb62ec70433253504a
Contents?: true
Size: 821 Bytes
Versions: 11
Compression:
Stored size: 821 Bytes
Contents
# Semantic differences between original ES6 and transpiled ES3 ### Referenced (inside closure) before declaration `defs.js` detects the vast majority of cases where a variable is referenced prior to its declaration. The one case it cannot detect is the following: ```javascript function printx() { console.log(x); } printx(); // illegal let x = 1; printx(); // legal ``` The first call to `printx` is not legal because `x` hasn't been initialized at that point of *time*, which is impossible to catch reliably with statical analysis. `v8 --harmony` will detect and error on this via run-time checking. `defs.js` will happily transpile this example (`let` => `var` and that's it), and the transpiled code will print `undefined` on the first call to `printx`. This difference should be a very minor problem in practice.
Version data entries
11 entries across 11 versions & 4 rubygems