title: How do you add multiple objects to an array? (JavaScript)
body: <p>I'm not sure if I phrased the question right. I'm fairly new to JavaScript, and I'd like to add multiple objects (?) to an array.
  If I have this array:</p>
  <pre><code>let arr = [{
    firstname: &quot;John&quot;,
    lastname: &quot;Smith&quot;
  }];
  </code></pre>
  <p>How would I add, say</p>
  <pre><code>var firstname = &quot;John&quot;;
  var lastname = &quot;Doe&quot;;
  </code></pre>
  <p>as</p>
  <pre><code>{ firstname: &quot;John&quot;,  lastname: &quot;Doe&quot; }
  </code></pre>
  <p>to the same array?</p>