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 + ");" ); };




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: