In JavaScript, I want to create an object instance (via the new operator), but pass an arbitrary number of arguments to the constructor. Is this possible?
new
This works!
var cls = Array; //eval('Array'); dynamically var data = [2]; new cls(...data);