Created
November 8, 2017 13:34
-
-
Save wilk/956d105d92ed922ee7a7de6247c2f587 to your computer and use it in GitHub Desktop.
throwing functions
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
try { | |
throw text => console.log(text) | |
} catch (fn) { | |
fn('hello from catch') // it prints out "hello from catch" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment