I need to create a function with variable number of parameters using new Function() constructor. Something like this:
new Function()
args = [\'a\', \'b\']; bod
A new feature introduced in ES5 is the reduce method of arrays. You can use it to sum numbers, and it is possible to use the feature in older browsers with some compatibility code.
reduce