0 points

Loop over an Array


dashboard

Fri Nov 13 2020 04:58:32 GMT+0000 (UTC)

Posted by @mvieira #javascript

fruits.forEach(function(item, index, array) {
  console.log(item, index)
})
// Apple 0
// Banana 1
content_copy Copy

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array