Thursday, February 19, 2026
Latest:
  • Wichtige wörter für B1 prüfung
  • What are the main differences between ApplicationContext and BeanFactory?
  • German B1 Word list
  • How does Lazy annotation work in Spring?
  • How Spring framework resolves circular dependencies?
Upokary

Upokary

Quality information

  • Health
  • Life
  • Fashion
  • Food
  • Code
  • English
  • বাংলা
Technology 

How to stop adding, modifying and deleting an object’s properties?

Published: August 7, 2021 freeze, JavaScript, object

In JavaScript, we can use the freeze() method of Object to stop adding, modifying, and deleting an object’s properties. The freeze() method will only allow us to read properties. It will not allow adding, modify and delete operations to the object.

Following is the code sample:

const userObj = {
    name: 'Joe Smith',
    gender: 'Male',
    age: 40
}

Object.freeze(userObj);
userObj.age = 50;
console.log(userObj);

You May Also Like

Difference between session.timeout.ms and max.poll.interval.ms for Kafka

June 9, 2020 beroza

Write a Program to Find Subdomain Visit Count

January 14, 2023 beroza

Use cases of Sets in JavaScript

September 19, 2021 beroza

What are differences between “mvn clean package” and “mvn clean install” in maven?

March 7, 2019 beroza

Enforce noninstantiability with a private constructor

January 22, 2020 beroza

ERROR: Permission to repository.git denied to username. fatal: The remote end hung up unexpectedly

August 31, 2019 beroza

java.lang.IllegalStateException: Ambiguous handler methods mapped for ‘/’

January 21, 2019 beroza

Babel vs Webpack: What are the differences?

August 27, 2021 beroza

What are the steps to run a ruby and rails project after cloning from Github?

May 21, 2020 beroza

Why Upokary?

Upokary.com is a useful application in everyday life. It provides very handy information regarding every aspect of life. Each and every tip of upokary.com is meant to make life better.

Upokary tools

  • Youtube thumbnail
  • Youtube video downloader

Useful Links

  • Handy code
  • Technology
  • People
  • Programming
  • Quote
  • Travel
  • WordPress
  • IELTS
  • Kids

Pages

  • Sitemap
  • Privacy policy
  • About us
  • Contact us

Support

For any kind of query or question please drop a message in the following email: upokary@gmail.com
Copyright © 2026 Upokary. All rights reserved.