OK, I will take a look at the Object Oriented Programming and Functional Programming Sections. I was trying to do everything in order, thinking that the curriculum was designed in that order so that one thing would build on the previous things.
If the ‘provided’ function is the same as the ‘callback’ function, why don’t they just use the word ‘callback?’ For a newbie, this stuff is hard enough as it is, and referring to the same thing in two ways when it’s not necessary, makes things more confusing.
Same thing regarding ‘invoking’ vs ‘calling’ a function. Why not use the same word consistently, to be more clear and avoid confusion? Also, when I googled ‘invoking vs calling a function’ I got all kinds of different info including this link:
So it seems some people think ‘invoke’ and ‘call’ are different…I am more confused about whether or not there is a difference between them and again, if they are the same thing, why there would be two words for the same thing (see my comment about ‘provided’ vs ‘callback’).
Regarding the ‘filter’ method - again, why wouldn’t MDN just say ‘callback’ instead of the ‘test implemented by the provided function?’ Makes no sense to use a whole bunch of words when ‘callback’ would suffice and also be more precise, since ‘callback’ would be referring to ‘callback.’ So confusing! OK, thanks for clarifying what the ‘value’ was - it is the value of the element. I wasn’t sure if you were referring to the boolean value of ‘true.’
I am confused by your statement ‘reduce is the method, reducer is how it is called the callback.’ I understand that ‘reduce’ is the method, but what do you mean by ‘reducer is how it is called the callback?’ Is ‘reducer’ the same as ‘callback’?
Another question that just came up as I was re-reading the instructions for this challenge is regarding the opening statement ‘It’s time we see how powerful arrow functions are when processing data.’ It doesn’t explain why arrow functions are powerful so I googled this to try to learn more.
Aren’t we expected to use the arrow functions as methods here (filter, map, reduce)? And the instructions state: ’ Arrow functions work really well with higher order functions, such as
filter() , and
reduce(). So it seems FCC and MDN are contradicting each other, or am I not understanding something?
And again the question- what specifically is ‘powerful’ about arrow functions? They are more concise but I found a lot of info about circumstances where they could be more problematic.
At this point I am more confused than ever regarding this challenge. The goal here is to use arrow functions, but MDN states arrow functions are ‘ill suited’ as methods…so why would we be instructed to do this exercise using methods with arrow functions?