If I have an instance of a String, and I modify its constructor's prototype, then the prototype of every String instance has that property (as expected).
"test string".constructor.prototype.thing = function() {return this;}
console.log("new string".thing());//prints "new string"
However, if I modify the String constructor's constructor's prototype, then this no longer works:
String.constructor.prototype.thing = function() {return this;}
console.log("new string".thing());//returns "new string".thing() is not a function
Same thing if I use the String.proto syntax. Why is this? I was under the impression that JavaScript will go all the way up the prototype chain when looking for a property. If I add a property to String.constructor.prototype, then String will not have that property, but its parent object will, correct? Therefore all instances of String should have access to that property as well. Where am I wrong in my thinking?