Created
April 11, 2017 10:07
-
-
Save simondell/ed756be7de0c7591cd3569f278fed975 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/howufam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
'use strict'; | |
try { | |
var _t = 't shouldn\'t be available in the catch or finally blocks'; | |
throw _t; | |
} catch (error) { | |
console.log('Here\'s the catch: ' + t); | |
console.log(error); | |
} finally { | |
console.log(t); | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">try { | |
let t = 't shouldn\'t be available in the catch or finally blocks'; | |
throw t; | |
} catch ( error ) { | |
console.log(`Here's the catch: ${t}`); | |
console.log(error); | |
} finally { | |
console.log(t); | |
}</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
try { | |
var _t = 't shouldn\'t be available in the catch or finally blocks'; | |
throw _t; | |
} catch (error) { | |
console.log('Here\'s the catch: ' + t); | |
console.log(error); | |
} finally { | |
console.log(t); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This made a lot more sense in the original ES6 dialect. Probably best you view it on JSBin rather than here. Sorry for the inconvenience.