title: Using an array with arguments to instantiate a class, javascript
body: <p>Let's say I have this class:</p>
  
  <pre><code>function Person(firstName, lastName){
    this.firstName = firstName;
    this.lastName = lastName;
  }
  </code></pre>
  
  <p>I have this array with arguments</p>
  
  <pre><code>var args = ['Jane', 'Smith'];
  </code></pre>
  
  <p>Is there anyway to instantiate the class with this array? I don't want to change my class if possible.</p>
  
  <pre><code>//Doing this somehow:
  var person = new Person(args)
  </code></pre>
  
  <p><a href="https://jsbin.com/xuyawunoko/edit?js,console" rel="nofollow">https://jsbin.com/xuyawunoko/edit?js,console</a></p>