Skip to content

Instantly share code, notes, and snippets.

@Wilfred
Created October 27, 2016 23:38
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 Wilfred/6c8e3ace15572aa7bbafe72f6bde7c05 to your computer and use it in GitHub Desktop.
Save Wilfred/6c8e3ace15572aa7bbafe72f6bde7c05 to your computer and use it in GitHub Desktop.
return inside finally
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