Array.prototype.filter() and filter()

Hello, a quick question :
what’s the difference between Array.prototype.filter() and filter() ?? I know they are the same but i want to know the meaning of Array.prototype.filter() same question goes and map()

So arrays are instances of the Array function. The Array function has the map and filter methods in its prototype object. Meaning when you call array.filter() its does a prototype chain look up to find that particular method and calls its. So there isn’t a difference it’s the same method that seats in the Array.prototype

1 Like

thanks you so much man!