Freeze and Seal Objects in JavaScript
4 min readDec 25, 2020
Variables we declare in javascript with the help of const
, are not purely constant. Let's say that if we have a variable called config with a bunch of properties and if we print it to the console you will see it has a name and a database object.
const config = {
name: "module-account",
database: {
host: "127.0.0.1",
port: "2020",
username: "admin",
password: "r@@t",
},
};console.log(config); //…