Challenge: Going Loopy Over Arrays

Solve tasks regarding loops in arrays in JavaScript.

We'll cover the following

Task 1

Write a function that accepts an array of strings as an argument and uses map to return a new array of the same words written in uppercase.

Sample input 1:

['Hello']

Expected output:

['HELLO']

Sample input 2:

['Hello', 'World']

Expected output:

['HELLO', 'WORLD']

Sample input 3:

['MY', 'NAME', 'IS', 'JOHN']

Expected output:

['MY', 'NAME', 'IS', 'JOHN']

Note: The below syntax is a little different from what we’ve studied, but you can ignore that because that is for testing purposes only. You only have to complete the below function according to the challenge described above.

Get hands-on with 1400+ tech skills courses.