const config = {
db: { host: "localhost", port: 5432 },
cache: { ttl: 300 },
};
Object.freeze(config);
config.debug = true;
config.db.port = 9999;
config.cache = { ttl: 600 };
const sealed = Object.seal({ version: "1.0", meta: { build: 42 } });
sealed.version = "2.0";
sealed.author = "devteam";
sealed.meta.build = 99;
console.log(
config.debug,
config.db.port,
config.cache.ttl,
sealed.version,
sealed.author,
sealed.meta.build
);
Post #3242
2.46K
CHALLENGE
- ❤ 5
- 👍 1