Explanation on how to do this


Hi, i havent got this bit right, i dont know if its a bit complicated or if my brain is fogging hard or a bit of both…

a explanation instead of just the code would be very appreciated and thanks for your time already


did you check the error in the output window? There is a problem with return. The shorthand you use will automatically return, so you don’t need to use the return keyword

if you do want to use the return keyword, don’t use this shorthand

i think you are pretty close to the solution.


its telling me to pass a non arrow function as an argument to the .map()

can you explain this to me without giving me the code please

kind regards and thanks alot


=> is the arrow function, it seems you can’t use that yet. It seems the exercise first wants you to write the full function, and then later refactor.


am i going in the right direction or i got it completly wrong? because i dont know how to interpolate that to create a new array with the first letter of each string


completely wrong. .map() is a function, there are multiple ways to use it. The exercise wants you to use the map function written full out, without an => shorthand. There isn’t much to explain about it, check from earlier exercise or documentation on how to write it


am i going in the right direction now? whats wrong


that is certainly a step in the right direction :slight_smile:

And you figured it out on your own, nicely done :slight_smile: Do pay close attention to how many parentheses you are using


ive tried before to put another parentheses and then the error changes to unexpected token
can you help me understand the theory of this please… sorry to be bothering all the time


why would you place the ) where you did? Is this a logic place?


im not sure, but without it i was still getting the other error


So you just inserted the closing parenthesise somewhere, and hoped it worked? That is not the way programming works. the ) you inserted closes the map function, where do you want to close your map function?


i still cant figure inside my brain where i should be putting that )


where you want your map function call to end.

Do you want me to tell you? Maybe look at documentation to see it? When looking at the docs, pay close attention to the parentheses


Yes please… if i click on get the code on the exercise it goes forward through all steps it gave me the arrow function already


line 6 should be:


we close the map function after the callback is completed.


thanks for being so patient so far mate, the error changed now

i dont know how to set up the return to return each first letter of each string


the map function provides access to each element in the array through a callback function, the parameter (message) of this callback function is what will contain each element of array, so what you need to manipulate.


Can you please give me the Code for this bit, because if i click on get code on codeacademy it jumps steps and i wouldnt want to jump it without understanding how to return the first characters of the other array


just do get answer then, i am not giving it. You can reset after getting the answer, and attempt it again