As a general rule, I never touch core Objects, prototypes, or methods. Unfortunately adding to or modifying core prototypes (like
Array.prototype) are suggested answers you’d find on sites like StackOverflow.
So you can do things like…
Array.prototype.forEach = undefined
Which removes the
forEach method for
Heck, you can even do this (below) and remove
Array all together:
window.Array = undefined
In fact, you can this with a bunch of stuff. Curiously though, you can’t do this with
Probably for the best anyway 😂.