TGViewer
JavaScript JavaScript @javascript · 31.1K subscribers
Post #3179 2.48K
CHALLENGE


const config = {
host: "localhost",
port: 3000,
db: {
name: "mydb",
maxConnections: 10
}
};

Object.freeze(config);

config.port = 9999;
config.db.maxConnections = 99;
config.newProp = "surprise";
delete config.host;

const sealed = Object.seal({ x: 1, y: 2 });
sealed.x = 100;
sealed.z = 999;
delete sealed.y;

console.log(config.port, config.db.maxConnections, config.host);
console.log(sealed.x, sealed.y, sealed.z);
  • 👍 2
  • ❤ 1
More from @javascript
  1. Sep 23, 2026🤩 tinyjs: Build JavaScript Desktop Apps in <10MB I built an app with this and was impress…
  2. Sep 23, 2026Post #3513
  3. Sep 23, 2026CHALLENGE function* inner() { yield 1; yield 2; return 100; } function* outer() { const re…
  4. Sep 22, 2026Post #3511
  5. Sep 22, 2026CHALLENGE function Foo(x) { this.x = x; return { x: x * 2 }; } function Bar(x) { this.x =…
  6. Sep 21, 2026Post #3509
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →