0 points

JavaScript forEach 2 – How to Loop Through an Array in JS


dashboard

Fri Nov 13 2020 21:51:09 GMT+0000 (UTC)

Posted by @mvieira #javascript

numbers.forEach((number, index, array) => {
    console.log(array);
});

numbers.forEach((number, index) => {
    console.log('Index: ' + index + ' Value: ' + number);
});
content_copy Copy

https://www.freecodecamp.org/news/javascript-foreach-how-to-loop-through-an-array-in-js/