Building an fCC Forum Leaderboard - Step 14

Can someone explain how does the map object work? I have been having trouble understanding it, despite seeing it in multiple occasions in the curriculum up until now. And specifically, how does it affect this leaderboard we are trying to build?

Challenge Information:

Learn Asynchronous Programming by Building an fCC Forum Leaderboard - Step 14

Hello! Try reading this:

and this:

1 Like

The challenge is using the map array method and not the Map() object.

Not sure I understand the question. What specifically are you asking about?

Hi @raven1177

Array.prototype.map(), or more simply map() is a simple array function, which is a method on the array object prototype.

So basically, the .map() method is used on an array, a call back function does something to each element in the array, without modifying the original array.

For this practice project, it is getting data from the freeCodeCamp website:

Then, instead of using lines and lines of code, using the .map()method you eventually produce something like this:

Happy coding

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.