Just did the Array.prototype.myMap implementation challenge : freeCodeCamp Challenge Guide: Implement map on a Prototype
I could not finish it without looking at the solution. I found it quite tricky because achieving it needed to understand that Array.prototype.myMap() callback function passes 3 arguments : the item on which the callback is performed, the index of this item and the full array. Even on the MDN page it is not clear that the 3 arguments are needed in the implementation and I quite not got it until in the “example” part of the documentation. I even had to go to the ECMAScript specification to have a clearer understanding of the subject.
The precedent challenge introducing Array.prototype.map did not explained it either.
Is it possible to add something in the challenge description to make it clearer that the callback function needs 3 arguments ?
I think the MDN page need a clearer description too, and opened an issue on GitHub (my first ) (I did not wanted to go too deep in the GitHub pull request rabbithole for now).
Do you think I am right or is this a feature of the curriculum ?
I am sure unclear implementation are frequent and it made me search, which is nice, but I wasn’t able to find the solution by myself and maybe this makes the learning curve a bit too steep.
Anyway, thanks a lot FCC, I definitively learnt something today !