There isn’t any difference, the sentence is saying there’s a function called
filter and it’s attached to the Array prototype object. People don’t say “array dot prototype dot filter”, they say “filter”, hence why it says "or simply
Whenever you create an array, like this:
const testScores [88,79,84,86,96]
const testScores= new Array(88,79,84,86,96);
Array class as needed. And that gives us access, directly on our array, to all the prototype methods of
Formally, they are defined as
… And so forth. But because they’re on the prototype, any array can reference them. So we’re more likely to
We know they’re array methods, so we don’t need to say where to find them all the time.
It would be like having a conversation and constantly saying “John Lithgow of Hollywood, California” each and every time you refer to the man, rather than eventually just “Mr Lithgow.”
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.