Make them uppercase!

Report a typo

Complete the missing parts in the following loop that converts each animal name to uppercase and prints the updated array.

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