JSTotD: isFrozen results

Re: Freezing Objects

The example that you give:
let obj = {};
console.log(Object.isFrozen(obj)); // true
Object.freeze(obj);
console.log(Object.isFrozen(obj)); // false
does not seem right. I tried this in the console of the latest version of Chrome it reports completely different results. The first one is false and the second one is true which is what you would expect.

2 posts were merged into an existing topic: JS Tip of the Day: Freezing Objects