Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on JavaScript: generating a function with runtime data from a declared function.
Were you aiming at something like this?
var generated = function(value) { return new Function( "return (" + function(valueToSwap) { return { prop: valueToSwap }; } + ")(" + value + ");" ); };
There are no comments on this comment yet.
Were you aiming at something like this?
var generated = function(value) { return new Function( "return (" + function(valueToSwap) { return { prop: valueToSwap }; } + ")(" + value + ");" ); };