title: Javascript - can't iterate through array of objects with images
body: <p>I have difficulties with iterating through array of objects which contains image. As my code below shows the array in console looks kind of empty but when I open it in console, I see all this objects also with iteration numbers. I can't google and get to the point how to transform it into proper working array to make for in loop and iterate through it in Vue.js.
  I attach you the code where comments says more than my description.</p>
  
  <pre><code>        const frameImage = [
          {
              url: 'http://www.realmadryt.pl/fotki/_up/newsy/lukamodric_165.png'
          },
          {
              url: 'http://www.realmadryt.pl/fotki/_up/newsy/florentinoperez_11.jpg'
          },
          {
              url: 'http://www.realmadryt.pl/fotki/_up/newsy/ramosbarkinsta1.jpg'
          },
          {
              url: 'http://www.realmadryt.pl/fotki/_up/newsy/lukamodric_165.png'
          },
          {
              url: 'http://www.realmadryt.pl/fotki/_up/newsy/florentinoperez_11.jpg'
          },
          {
              url: 'http://www.realmadryt.pl/fotki/_up/newsy/ramosbarkinsta1.jpg'
          },
      ];
  
      let createdImages = [];
  
      frameImage.forEach(item =&gt; {
          const image = new Image();
          image.src = item.url;
          image.onload = () =&gt; {
              // set image only when it is loaded
              createdImages.push({
                  image,
                  width: image.width,
                  height: image.height,
                  x: 0,
                  y: 0,
                  draggable: true
              });
          };
      });
      console.log(createdImages)
  
  
      // nothing happens
      createdImages.forEach(item =&gt; {
          console.log(item)
      });
  
      //also nothing happens
      for(img in createdImages) {
          console.log(img);
      }
  
      //length is actually 0?
      console.log(createdImages.length)
  </code></pre>
  
  <p>Also jsFiddle: <a href="https://jsfiddle.net/qruskmp4/2/" rel="nofollow noreferrer">LINK</a></p>