On 13/12/2012, at 01:47, Rick Waldron wrote: > > On Wed, Dec 12, 2012 at 7:20 PM, Jorge Chamorro <[email protected]> > wrote: > On 12/12/2012, at 18:37, Rick Waldron wrote: > > Runtime code generation? new Function( thecode ) works just as well, I guess > > ...sometimes: > > (function (p) { > > eval("(function(){console.log(p)})")(); > > try { > Function("console.log(p)")(); > } > catch (e) { > console.log("FAIL -> "+ e.message); > } > > })("OK"); > > OK > FAIL -> Can't find variable: p > > > Of course not, but that's not what I was talking about, is it?
Just to clarify, I meant: "new Function( thecode ) works just as well" ( as eval() ) "...sometimes". The code is an attempt to illustrate it. -- Jorge. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
