Created
October 27, 2016 23:38
-
-
Save Wilfred/6c8e3ace15572aa7bbafe72f6bde7c05 to your computer and use it in GitHub Desktop.
return inside finally
This file contains hidden or 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
function foo() { | |
try { | |
throw new Error(); | |
} finally { | |
return 42; | |
} | |
} | |
// Logs 42 | |
console.log(foo()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment