const pets = ['Dog', 'Cat', 'Hamster']; pets.forEach(function(element, index, array){ console.log('\nIndex:' + index); console.log('Element:' + element); console.log('Array:' + array); });
This Pen is owned by Marina Yamaoto on CodePen.
See more by @marina294 on CodePen
This Pen doesn't use any external CSS resources.