JavaScript-Garden icon indicating copy to clipboard operation
JavaScript-Garden copied to clipboard

Array.forEach should be Array.prototype.forEach

Open lewisje opened this issue 9 years ago • 1 comments

The Array constructor does not even have a property called forEach; now if the # convention were explained (useful in case many prototype methods are discussed), Array#forEach would be appropriate, but for the one-off mention in the section titled "Extension of Native Prototypes", it's better to just say Array.prototype.forEach, even though the MDN URL hierarchy does not distinguish between static methods like Array.isArray and prototype methods like Array.prototype.forEach.

lewisje avatar May 29 '16 19:05 lewisje

Yes, you're right.

peterjwest avatar May 29 '16 20:05 peterjwest