Open this example in the interactive library
Source code
const config = Object.freeze({ mode: "demo" });
console.log(Object.isFrozen(config), config.mode);
Sample output
true demo

Freeze a configuration. A self-contained example using the JavaScript runtime.
Open this example in the interactive library
const config = Object.freeze({ mode: "demo" });
console.log(Object.isFrozen(config), config.mode);
true demo