1const array1 = ['a', 'b', 'c'];
2
3array1.forEach((element) => {
4 console.log(element)
5});
6
7// expected output: "a"
8// expected output: "b"
9// expected output: "c"
1//es6
2Array.from(els).forEach((el) => {
3});
4
5//old shit
6Array.prototype.forEach.call(els, function(el) {
7 // Do stuff here
8 console.log(el.tagName);
9});
10
11// Or
12[].forEach.call(els, function (el) {...});