Aryan PrajapatKnowledge Contributor
How do you determine whether object is frozen or not
How do you determine whether object is frozen or not
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Questions | Answers | Discussions | Knowledge sharing | Communities & more.
Object.isFrozen() method is used to determine if an object is frozen or not.An object is frozen if all of the below conditions hold true,
If it is not extensible.
If all of its properties are non-configurable.
If all its data properties are non-writable. The usage is going to be as follows,
const object = {
property: “Welcome JS world”,
};
Object.freeze(object);
console.log(Object.isFrozen(object));