FAQ: Code Challenges: Intermediate JavaScript - convertToBaby()

This code is not correct, if we add another function call:

console.log(convertToBaby(animals)) 
console.log(convertToBaby(['a', 'b', 'c'])) // I was too lazy to use actual animal names

we get the wrong output.

2 Likes