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