javascript array FprEach code example
Example 1: foreach javascript
var items = ["item1", "item2", "item3"]
var copie = [];
items.forEach(function(item){
copie.push(item);
});
Example 2: foreach loop javascript
const numList = [1, 2, 3];
numList.forEach((number) => {
console.log(number);
});