I'm trying to get Object.create(String.prototype)
to function properly. But, for some reason, it never works.
What I have
let s = Object.create(String.prototype);
s.one = function () {console.log("I'm working")};
s.two = function () {console.log("I'm working too")};
a = 'String'
a.one()//Suppose to log I'm working
a.two()//Suppose to log I'm working too
How it's suppose to work
String.prototype.one = function () {console.log("I'm working")};
String.prototype.two = function () {console.log("I'm working too")};
a = 'String'
a.one()//Suppose to log I'm working
a.two()//Suppose to log I'm working too