JS Property Descriptors - Interactive Lab | IconVault
Toggle writable, enumerable and configurable on live properties, run real assign and delete attempts, and explore freeze and seal gotchas.
JS Property Descriptors
Writable, enumerable, configurable plus freeze and seal gotchas
Define a property
Live object
{ writable: false, enumerable: true, configurable: false }
{ writable: true, enumerable: false, configurable: true }
Experiment log
Try assign / Try delete on a property, or run the inspector…
const obj = {};
Object.defineProperty(obj, "id", {
value: 1,
writable: false,
enumerable: true,
configurable: false,
});
Object.defineProperty(obj, "secret", {
value: "shh",
writable: true,
enumerable: false,
configurable: true,
});
Object.getOwnPropertyDescriptor(obj, "id");
// {"value":1,"writable":false,"enumerable":true,"configurable":false}Freeze / seal gotchas, executed live
Frozen array push throws
const arr = Object.freeze([1, 2, 3]); arr.push(4); // TypeError in strict mode
Freeze is shallow
const obj = Object.freeze({ nested: { a: 1 } });
obj.nested.a = 99; // works! freeze is shallowSeal allows writes, blocks add/delete
const obj = Object.seal({ a: 1 });
obj.a = 2; // ok
obj.b = 3; // TypeError in strict mode
delete obj.a; // TypeError in strict modeNon-configurable cannot be redefined
const obj = {};
Object.defineProperty(obj, "id", { value: 1, configurable: false });
Object.defineProperty(obj, "id", { writable: true }); // TypeError5 of 5 free inspections left. Runs fully in your browser.
About this tool
IconVault's JS Property Descriptors lab makes the hidden flags behind every JavaScript property visible and touchable. Define properties with writable, enumerable and configurable toggles, then run real assignment and delete attempts to see what silently fails in sloppy mode and what throws a TypeError in strict mode. The live object shows Object.keys, JSON.stringify and spread behavior updating as you flip flags. It is free and runs fully in your browser, and your whole session exports as copyable code.
A second section executes the classic freeze and seal gotchas live: pushing to a frozen array, mutating through a shallow freeze, sealing while still allowing writes, and the TypeError from redefining a non-configurable property. These are the exact behaviors that surprise developers in interviews and production bugs, demonstrated with running code instead of documentation quotes.
Frequently asked questions
Popular searches
More tools
Algorithm Visualizer
Watch sorting and searching animate step by step
Alt Text Helper
Write better image alt text with live feedback
ARIA Reference
Searchable ARIA roles and attributes guide
Array Visualizer
Step through map, filter, reduce like a debugger
Coming soon
CLI
Coming soon
Figma plugin
Coming soon
VS Code extension
Coming soon
Chrome extension
Coming soon
AI icon generator
Coming soon
Team workspaces
Coming soon