shoutGreetings() not working

function shoutGreetings(arr) {

return arr.map(word => {

word.toUpperCase() + '!';

})

}

const greetings = [‘hello’, ‘hi’, ‘heya’, ‘oi’, ‘hey’, ‘yo’];

console.log(shoutGreetings(greetings));

Why doesn’t the code work? .-. The result in the console is ‘undefined’.

When braces are used, the return keyword must be present.

Thanks man, so simple but I forgot :sweat_smile:

1 Like