const config = {
host: "localhost",
port: 3000,
db: {
name: "mydb",
retries: 5
}
};
Object.freeze(config);
config.port = 9999;
config.newProp = "injected";
config.db.retries = 99;
delete config.host;
console.log(
config.port,
config.newProp,
config.db.retries,
config.host
);
Post #3126
2.95K
CHALLENGE
- 🔥 3
- ❤ 2
- 👍 1