3 ms·
That is tempting, and I've dome similar things earlier. But I don't want to do that. Why because: It is not a good practice to modify JavaScript built-in proto
by galaxyLogic 3y ago
That is tempting, and I've dome similar things earlier.
But I don't want to do that. Why because: It is not a good practice to modify JavaScript built-in prototypes. If that was the recommended practice then someone else's code might do a similar thing, but assign some other function to it. Whoever writes it last overrides any previous definition.
- gabrielsroka 3y ago> someone else's code I don't use someone else's code. I use my code. But I may be the minority. Use a namespace, then. Array.prototype.glAppend = Array.prototype.push;