4 ms·
Why exactly do you have to do that? Because some other unknown party could have overwritten the prototype with a new map function? If that's the case, none of
by brunoc 15y ago
Why exactly do you have to do that? Because some other unknown party could have overwritten the prototype with a new map function?
If that's the case, none of the basic objects are safe, not just Array..
- IgorPartola 15y agoRight. My point exactly. In most cases this is not a problem and sometimes can be really nice: like when you want to add some profiling code, etc. However, this is also pretty terrible when it comes to large code bases or when you see libraries out there that modify prototypes of base objects.