JSFiddle - React, Tailwind, and code Playground
JavaScript
Object.defineProperty(Object.prototype, "toUpperCaseString", {
value: function toUpperCaseString() {
return this.toString().toUpperCase();
},
enumerable: false
});
for (var key in {}) {
if (key === "toUpperCaseString") {
console.log("I never print");
}
}
console.log(({}).toUpperCaseString());