Why is it frowned upon to modify JavaScript object’s prototypes?

The problem is that prototype can be modified in several places. For example one library will add map method to Array’s prototype and your own code will add the same but with another purpose. So one implementation will be broken.

Leave a Comment