Skip to content

Instantly share code, notes, and snippets.

@brandonsueur
Created July 12, 2018 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brandonsueur/5945036057d9a1112bd1835e48c3316f to your computer and use it in GitHub Desktop.
Save brandonsueur/5945036057d9a1112bd1835e48c3316f to your computer and use it in GitHub Desktop.
🎉 Test JavaScript
function magic() {
let a = 1;
a = 2;
let b = innerMagic();
a = 3;
return b;
function innerMagic() {
return a;
}
}
magic() // return ? => 3, 2 or "innerMagic is not defined"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment