Tables in the Console!
1 function Image(alt, source, width, height) {
2 this.alt = alt;
3 this.source = source;
4 this.width = width;
5 this.height = height;
6 }
7
8 var imageElements = document.getElementsByTagName("img");
9
10 var images = {};
11
12 for (var i = imageElements.length - 1; i >= 0; i--) {
13 var img = imageElements[i];
14 images[i] = new Image(img.alt, img.src, img.width, img.height);
15 };
16
17 console.table(images, ["alt", "source", "width", "height"]);