JS: Object.isExtensible
Object.isExtensible(obj)
-
Return
true
if a object obj is an object and is extensible , elsefalse
.💡 TIP: Better is Reflect.isExtensible . It throws error if argument is not object.
Object.isExtensible({})
// warning: false may mean the argument is not an object console.log(Object.isExtensible(3) === false);