Created
September 10, 2017 03:33
-
-
Save StevenJL/c49e50acae67f3ef5da8e487d0801e2a to your computer and use it in GitHub Desktop.
let.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (false) { | |
var x = "never_assigned"; | |
} | |
x //=> returns undefined instead of raising error | |
if (false) { | |
let x = "never_assigned"; | |
} | |
x //=> raises a ReferenceError: x not defined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment