1 const fakeImages = document.querySelectorAll(".fake-image");
2
3 for (var i = 0; i < fakeImages.length; i++) {
4 console.log('fakeImage: ', fakeImages[i]);
5 }
6
7 for (const fakeImage of fakeImages) {
8 console.log('fakeImage: ', fakeImage);
9 }
10
11 for (const fakeImage of fakeImages.entries()) {
12 console.log('fakeImage: ', fakeImage);
13 };
14
15 for (const fakeImage of fakeImages.values()) {
16 console.log('fakeImage: ', fakeImage);
17 };
18
19 for (const fakeImage of fakeImages.keys()) {
20 console.log('fakeImage: ', fakeImage);
21 };
22
23 fakeImages.forEach(fakeImage => {
24 console.log('fakeImage: ', fakeImage);
25 });
26
27 [...fakeImages].forEach(fakeImage => {
28 console.dir(fakeImage);
29 });
30
1var toNodeList = function(arrayOfNodes){
2 var fragment = document.createDocumentFragment();
3 arrayOfNodes.forEach(function(item){
4 fragment.appendChild(item.cloneNode());
5 });
6 return fragment.childNodes;
7};
8