|
|
|
|
|
by sigilworks
4481 days ago
|
|
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 + ");" );
}; |
|