[Solved] How to use “String.prototype” in javascript
If you were going to augment a built-in prototype to do this, it would make more sense to augment Element.prototype, not String.prototype, since what you’re trying to use hide on isn’t a string, it’s an HTMLElement instance (which inherits from Element). But it’s usually not a good idea to augment/extend the built-in prototypes. It’s fragile. … Read more