console.log('-forEach-');
const forEachResult = ['Dog', 'Cat', 'Hamster'].forEach(function(element) {
return element.toUpperCase();
});
console.log(forEachResult);
console.log(`\n----------------------------------------------\n`);
console.log('-map-');
const mapResult = ['Dog', 'Cat', 'Hamster'].map(function(element) {
return element.toUpperCase();
});
console.log(mapResult);
This Pen doesn't use any external CSS resources.