Let's say I have this class:
function Person(firstName, lastName){
this.firstName = firstName;
this.lastName = lastName;
}
I have this array with arguments
var args = ['Jane', 'Smith'];
Is there anyway to instantiate the class with this array? I don't want to change my class if possible.
//Doing this somehow:
var person = new Person(args)