forxtu
10/8/2019 - 9:07 AM

JS Bin// source https://jsbin.com/zucekaworu

const obj = {
  prop1: "prop 1 name"
}

// hasOwnProperty
Object.prototype.myHasOwnProperty = function(prop) {
    const proto = this.constructor.prototype;
    return prop in this && (!(prop in proto) || this[prop] !== proto[prop]);
};

console.log(obj.myHasOwnProperty("prop1"));