Last active
December 31, 2015 08:39
-
-
Save wlaurance/7961562 to your computer and use it in GitHub Desktop.
Not as useful when I inject globals in the browser or something and I want to check for their existence.
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
| $ node | |
| > typeof a | |
| 'undefined' | |
| > function _typeof(thing) { return typeof thing; } | |
| undefined | |
| > _typeof(a) | |
| ReferenceError: a is not defined | |
| at repl:1:10 | |
| at REPLServer.self.eval (repl.js:110:21) | |
| at Interface.<anonymous> (repl.js:239:12) | |
| at Interface.EventEmitter.emit (events.js:95:17) | |
| at Interface._onLine (readline.js:202:10) | |
| at Interface._line (readline.js:531:8) | |
| at Interface._ttyWrite (readline.js:760:14) | |
| at ReadStream.onkeypress (readline.js:99:10) | |
| at ReadStream.EventEmitter.emit (events.js:98:17) | |
| at emitKey (readline.js:1095:12) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment