0 votes
in JavaScript by
How do you check whether an object can be extendable or not?

1 Answer

0 votes
by

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.

...