Skip to content

Instantly share code, notes, and snippets.

@aryak007
Created March 28, 2018 13:00
Show Gist options
  • Select an option

  • Save aryak007/3e09576a25f71d08f1a5ab0b7fca3869 to your computer and use it in GitHub Desktop.

Select an option

Save aryak007/3e09576a25f71d08f1a5ab0b7fca3869 to your computer and use it in GitHub Desktop.
function foo(){
var bar = "bar";
for(let i = 0;i<bar.length;i++){
console.log(bar.charAt(i));
}
console.log(i) // Referece error
}
foo();
function foo(bar){
if(bar){
let baz = bar;
if(baz)
{
let bam = baz;
}
console.log(bam); // error
}
console.log(baz); //error
}
foo("bar");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment