Skip to content

Instantly share code, notes, and snippets.

@droxer
Created June 2, 2015 13:11
Show Gist options
  • Select an option

  • Save droxer/04b2ec98b60cdaa154e6 to your computer and use it in GitHub Desktop.

Select an option

Save droxer/04b2ec98b60cdaa154e6 to your computer and use it in GitHub Desktop.
javascript eval example.
#!/usr/local/bin/node
var assert = require('assert')
function foo () {
return "foobar";
}
eval("var bar = " + foo.toString())
assert.equal(foo(), bar())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment