title: Store script src in array
body: <p>I am loading all assets and <code>js</code> &amp; <code>css</code> from next page and store them in an <code>Array</code> but I forEach loop through the document and store the javascript link seperatly now so like this:</p>
  
  <pre><code>0:{images: Array(61)}
  1:{js: script}
  2:{js: script}
  3:{js: script}
  4:{js: script}
  5:{js: script}
  6:{js: script}
  etc...
  </code></pre>
  
  <p>Here is the loop:</p>
  
  <pre><code>[].forEach.call( document.querySelectorAll("script[src]"), function( src ) {
      console.log( src );
      resources.push({js: src})
   });
  </code></pre>
  
  <p>But how do I store them like the images all in one object instead of pushing them separately.</p>