Skip to content

Instantly share code, notes, and snippets.

@thebinarypenguin
Last active July 5, 2017 21:31
Show Gist options
  • Save thebinarypenguin/957dc7d11b2db898e9fef2cceca232b7 to your computer and use it in GitHub Desktop.
Save thebinarypenguin/957dc7d11b2db898e9fef2cceca232b7 to your computer and use it in GitHub Desktop.

A Tale of Two Scopes

Hi, I'm an ES6 enthusiast and I'm here to explain why the convenience of one set of scope rules in JavaScript has been replaced by the convenience of two sets of scope rules.

You're probably thinking, "Sure, more scope rules are great, and I don't mind paying the extra cognitive load, but how will I remember all those rules?"

Well, scientists have discovered that even monkeys can memorize two sets of scope rules. Are you stupider than a monkey? Of course you're not.

--Paraphrased from The Simpsons episode "A Tale of Two Springfields"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment