Hi all,
what is the best way to iterate over an array using the built-in method forEach() including an template literal?
const aliens = ["Blorgous", "Glamyx", "Wegord", "SpaceKing"];
const greetAliens = array => {
array.forEach(element => `Oh powerful ${element}, we humans offer our unconditional surrender!`);
return array;
};
console.log(greetAliens(aliens));
Using the code above I am getting only the elements inside the array.