Are there any pitfalls in changing the prototype of the String object? I'd like to change the word substr to "left":
String.prototype.left = function(n) {
return this.substr(0,n)
}
Is this ok, or should I just get over it?
Next, I'm going to write a .right(), a .mid(), a .val() and a .int().