Answers for "can we do something in foreach loop javascript"

35

foreach javascript

let words = ['one', 'two', 'three', 'four'];
words.forEach((word) => {
  console.log(word);
});
// one
// two
// three
// four
Posted by: Guest on May-27-2020
17

foreach javascript

var items = ["item1", "item2", "item3"]
var copie = [];

items.forEach(function(item){
  copie.push(item);
});
Posted by: Guest on February-27-2020

Code answers related to "can we do something in foreach loop javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language