Complete the missing parts in the following loop that converts each animal name to uppercase and prints the updated array.
ForEach method
Make them uppercase!
Report a typo
Fill in the gaps with the relevant elements
let animals = ["cat", "dog", "elephant"];
animals.(function(animal, index, ) {
array[] = animal.toUpperCase();
});
console.log(animals); // ["CAT", "DOG", "ELEPHANT"]Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.