Object Oriented and Functional Programming DESPERATELY needs rewrite!
See original GitHub issueChallenge Iterate over Arrays with map has an issue.
The description of this waypoint is completely inadequate. It reads:
The map method is a convenient way to iterate through arrays. Here’s an example usage:
var timesFour = oldArray.map(function(val){ return val * 4; });
The map method will iterate through every element of the array, creating a new array with values that have been modified by the callback function, and return it. Note that it does not modify the original array.
In our example the callback only uses the value of the array element (the val argument) but your callback can also include arguments for the index and array being acted on.
It does not really explain the syntax, what results the map method produces and requires readers to speak CSspeak and decipher many implicit unstated things.
I am struggling to understand anything in the section Object Oriented and Functional Programming, not because the concepts are difficult but because the lessons are poorly constructed. I’m referring to Crockford, Eloquent JS and Codeacademy to provide information written in a manner that I can understand.
Forgive my shortness, I just hope that my suggestion that this need a rewrite is taken up.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top GitHub Comments
I think that the challenge is clear enough …and at this point we should be familiar with the Read-Search-Ask
@manicmarvin thanks for the feedback. Maybe we can expand the example code a bit to show what the
oldArray
is and what the.map
function returns.This line needs to be changed to
What these changes should look like
To contributors, please first read the contributing guidelines before taking care of this issue. And feel free to visit the Contributors Help chat room if you have any questions about helping. We’re there to help.