Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ar5had
Created May 12, 2017 15:40
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 ar5had/9bf574244f465382bf8ab58ca627d0f1 to your computer and use it in GitHub Desktop.
Save ar5had/9bf574244f465382bf8ab58ca627d0f1 to your computer and use it in GitHub Desktop.
hack for block scope variables in es5..
try {
throw 1;
} catch (myfancyvariable) {
console.log('This variable is only availabe within this catch block =>', myfancyvariable);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment