Learn Basic String and Array Methods by Building a Music Player - Step 18

Question:
Chain the join() method to your map() method and pass in an empty string for the separator.

https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-basic-string-and-array-methods-by-building-a-music-player/step-18

My code:

const renderSongs = (array) => {
const songsHTML = array
.map((song)=> {
…
}
).join(“”)
};

It seems quite straight forward but it just keeps telling me my code doesn’t pass and i should add join(“”) to the existing code, which i did already!

Anyone can explain what’s wrong?

Appreciate your help!

3 Likes

Please post a link to the Step. Thanks

1 Like

Hi Jeremy,

I just edited the post with a hyperlink, is that what you want?

Thanks!

1 Like

What’s with those three dots?

nothing seems wrong here.

Originally, the closing curly brace and the closing parenthesis were on the same line, and that’s where the tests are expecting them to be. If you put them back then you will pass.

I understand that this shouldn’t make a difference, but if you want to make the tests happy then I would recommend that you not change anything that is already there unless you absolutely have to.

P.S. Just to be clear, the closing curly brace, closing parens, and join all need to be on the same line.

1 Like

Omg! this kicks me back for 2 days, i’m crying!

Thank you so much!!

It’s a bit nuisance and hope we can do sth to stop this from happening to others, such a waste of time and patience.

Appreciate your kind help!

All solved!

2 Likes

Hey, if you want, you can open up a github issue for this so that it can get fixed and other people won’t run into this.

1 Like

Thank you so much bbsmooth, I’ll try in the future if I’m capable to do so, this moment I have no idea at all about github :grimacing:

1 Like