JavaScript question detail
How do you check whether an object can be extended or not
The Object.isExtensible() method is used to determine if an object is extendable or not. i.e, Whether it can have new properties added to it or not.
const newObject = {};
console.log(Object.isExtensible(newObject)); //true
Note: By default, all the objects are extendable. i.e, The new properties can be added or modified.