forEach array
by ptums
JavaScript
// my example array to execute the forEach method on
const myWebStack = ['JavaScript', 'HTML', 'CSS', 'somtimes PHP', 'sometimes Python', 'sometimes SaSS'];
// executing the forEach method on the array myWebStack
myWebStack.forEach(function(item, index, array) {
console.log(array);
});
// the return message is this...
/*
["JavaScript", "HTML", "CSS", "somtimes PHP", "sometimes Python", "sometimes SaSS"]
["JavaScript", "HTML", "CSS", "somtimes PHP", "sometimes Python", "sometimes SaSS"]
["JavaScript", "HTML", "CSS", "somtimes PHP", "sometimes Python", "sometimes SaSS"]
["JavaScript", "HTML", "CSS", "somtimes PHP", "sometimes Python", "sometimes SaSS"]
["JavaScript", "HTML", "CSS", "somtimes PHP", "sometimes Python", "sometimes SaSS"]
["JavaScript", "HTML", "CSS", "somtimes PHP", "sometimes Python", "sometimes SaSS"]
*/