JS: Object.getPrototypeOf ❌
🟢 TIP: better is Reflect.getPrototypeOf.
Object.getPrototypeOf(obj)-
- Return the parent of object obj.
- If obj is not a object, it is converted to object first.
console.log(Object.getPrototypeOf({}) === Object.prototype);
🟢 TIP: better is Reflect.getPrototypeOf.
Object.getPrototypeOf(obj)console.log(Object.getPrototypeOf({}) === Object.prototype);