Skip to content

Instantly share code, notes, and snippets.

@kaichen
Created July 1, 2011 14:43
Show Gist options
  • Select an option

  • Save kaichen/1058689 to your computer and use it in GitHub Desktop.

Select an option

Save kaichen/1058689 to your computer and use it in GitHub Desktop.
js function wtf
foobar = (x) -> not_exist
foobar(1)
function foobar(x) {
not_exist
}
foobar(1)
~ $ coffee Source/dummy.coffee ‹ruby-1.9.2@devel› [10:40:43]
ReferenceError: not_exist is not defined
at /Users/kaichen/Dropbox/Source/dummy.coffee:4:5
at Object.<anonymous> (/Users/kaichen/Dropbox/Source/dummy.coffee:6:3)
at Object.<anonymous> (/Users/kaichen/Dropbox/Source/dummy.coffee:7:4)
at Module._compile (module.js:407:26)
at Object.run (/usr/local/Cellar/coffee-script/1.1.1/lib/coffee-script/lib/coffee-script.js:62:19)
at /usr/local/Cellar/coffee-script/1.1.1/lib/coffee-script/lib/command.js:120:29
at /usr/local/Cellar/coffee-script/1.1.1/lib/coffee-script/lib/command.js:90:26
at [object Object].<anonymous> (fs.js:107:5)
at [object Object].emit (events.js:61:17)
at afterRead (fs.js:878:12)
~ $ node Source/dummy.js ‹ruby-1.9.2@devel› [10:42:21]
node.js:134
throw e; // process.nextTick error, or 'error' event on first tick
^
ReferenceError: not_exist is not defined
at foobar (/Users/kaichen/Dropbox/Source/dummy.js:2:3)
at Object.<anonymous> (/Users/kaichen/Dropbox/Source/dummy.js:5:1)
at Module._compile (module.js:407:26)
at Object..js (module.js:413:10)
at Module.load (module.js:339:31)
at Function._load (module.js:298:12)
at Array.<anonymous> (module.js:426:10)
at EventEmitter._tickCallback (node.js:126:26)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment