JSFiddle - React, Tailwind, and code Playground
by Munawwar
JavaScript
function A() {
this.message = "hi";
};
A.prototype = {
message: "bye"
};
var obj1 = new A();
alert(obj1.message); //"hi"
alert(obj1.hasOwnProperty('message') ? 'true' : 'false'); //true
delete obj1.message;
alert(obj1.message); //"bye"
alert(obj1.hasOwnProperty('message') ? 'true' : 'false'); //false