JavaScript-Garden
JavaScript-Garden copied to clipboard
Array.forEach should be Array.prototype.forEach
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.
Yes, you're right.