Created
July 5, 2018 20:59
-
-
Save bignimbus/c3fb94ad39ede9b6e871d6ff1a34b816 to your computer and use it in GitHub Desktop.
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
throw 'foo'; | |
// throws an exception of type String and value "foo" | |
throw new Error('foo'); | |
// throws an exception of type Error with message "foo" | |
foo(); | |
// throws an exception of type ReferenceError (extends Error) | |
// with message "foo is not defined" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment