Skip to content

Instantly share code, notes, and snippets.

Created August 18, 2017 06:20
Show Gist options
  • Save anonymous/fa968c131e3c836764ee43b6ff06699d to your computer and use it in GitHub Desktop.
Save anonymous/fa968c131e3c836764ee43b6ff06699d to your computer and use it in GitHub Desktop.
BindingHoistingExceptions
// document
function test()
{
var what = 42;
for (i = 0; i < 10; i++)
{
console.log("i = " + i);
}
}
test();
try {
console.log("typeof what = " + (typeof what) + ", typeof i = " + i);
console.log("what = " + what + ", i = " + i);
}
catch(myError)
{
console.log("Error: " + JSON.stringify(myError));
}
finally
{
console.log("done...");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment