I’m trying to find out how to extend JavaScript with some of my own methods similar to toLowerCase()
Say I wanted a capitalize() or addUnderscores(), really whatever. I’m assuming there is a way to extend or overwrite existing ones.
Also is there a way to do it with jQuery?
Not with jQuery. Just extend the
prototypeof the specific type you need…In the function,
thiswill be the string on which you called the method.