I'm trying to do a function like .split() or .replace() or .remove(), i think is like a prototype function, how i can make this example works:
this.logThis = function(a) {
console.log("The " + this + "is cool like a " + a);
}
var food = "apple";
food.logThis("orange");
To get this Output:
> "The apple is cool like a orange"
Important: I need the most short code possibly, pure javascript, NO JQUERY