Hacker News new | past | comments | ask | show | jobs | submit login

I think there are some errors in the final solution code, as it doesn't do what you describe.

Were you aiming at something like this?

var generated = function(value) { return new Function( "return (" + function(valueToSwap) { return { prop: valueToSwap }; } + ")(" + value + ");" ); };




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: