Then, please follow the instructions exactly. The instructions were:
Pass in a callback function to the map() method. The callback function should take song as a parameter, use the arrow function syntax, and have an empty body.
If you need help understanding this instruction, let us know.
Okay, let’s break it up into small pieces and check which one is the unclear one.
1-Pass in a callback function to the map() method.
2- The callback function should take song as a parameter,
3- use the arrow function syntax,
4- and have an empty body.
There are about 4 different concepts here. Can you tell me which one you know how to do and which one is confusing?
If you know one of them, show me the code you would write.
i know step number 3 and 1
hello = () => “Hello World!”; an example would be this for the arrow syntax
const newArr = numbers.map(myFunction) would be syntax for the map () method
i am confused about the other two
Good! Please combine the two examples into one but this time, give map a completely empty arrow function.
A completely empty arrow function is like this: () => {}
This is an arrow function that has no parameters and an empty body btw.