“ES6 Foreach Element Dom Element” Ответ

ES6 FOREACH

const array1 = ['a', 'b', 'c'];

array1.forEach((element) => {
  console.log(element)
});

// expected output: "a"
// expected output: "b"
// expected output: "c"
Cute Chinchilla

ES6 Foreach Element Dom Element

//es6
Array.from(els).forEach((el) => {
});

//old shit
Array.prototype.forEach.call(els, function(el) {
    // Do stuff here
    console.log(el.tagName);
});

// Or
[].forEach.call(els, function (el) {...});
Andrew Lautenbach

Ответы похожие на “ES6 Foreach Element Dom Element”

Вопросы похожие на “ES6 Foreach Element Dom Element”

Больше похожих ответов на “ES6 Foreach Element Dom Element” по JavaScript

Смотреть популярные ответы по языку

Смотреть другие языки программирования