Skip to content

Instantly share code, notes, and snippets.

@imjayson
Created August 15, 2013 14:40
Show Gist options
  • Save imjayson/6241350 to your computer and use it in GitHub Desktop.
Save imjayson/6241350 to your computer and use it in GitHub Desktop.
ECMAScript 6: Lexical block scope
function doSomething() {
let N = 5;
if (someCondition) {
let N = 10;
doSomethingElse(N);
}
console.log(N); // 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment