MDN wants to learn about developers like you: https://qsurvey.mozilla.com/s3/MDN-dev-survey

Perelandric

Member since
Perelandric

Recent Docs Activity

View all activity
Page Date Comment

Array.prototype.map()


Commenting out the second param gives the polyfill function object the correct, required .length

Array.prototype.forEach()


Commenting out the second param gives the polyfill function object the correct, required .length

Array.prototype.forEach()


A strict equal comparison to null is not correct. Keep it as ==

Array.prototype.forEach()


Object.assign()


Polyfill: IIFE is superfluous. Function length was wrong. Separate checks for null/undefined are unnecessary when == can be used. The hasOwnProperty can be shadowed, so we shouldn't rely on the prototype chain. Variable names are closer to spec.