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.

All tools

JS Property Descriptors

Writable, enumerable, configurable plus freeze and seal gotchas

5 of 5 free uses left

Define a property

Live object

id: 1

{ writable: false, enumerable: true, configurable: false }

secret: "shh"

{ 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 shallow

Seal 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 mode

Non-configurable cannot be redefined

const obj = {};
Object.defineProperty(obj, "id", { value: 1, configurable: false });
Object.defineProperty(obj, "id", { writable: true }); // TypeError

5 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

javascript property descriptorsobject.defineproperty tutorialwritable enumerable configurablejavascript object.freeze vs sealobject.preventextensionsconfigurable false javascriptnon enumerable property javascriptobject.getownpropertydescriptordefineproperty getter setterjavascript accessor propertiesfrozen object javascriptseal vs freeze javascriptobject descriptors explainedjavascript property attributeswhy assignment fails frozen objectstrict mode typeerror assignmentobject.keys vs getownpropertynamesjavascript data descriptor vs accessor descriptordefineproperty exampleobject.freeze array pushcannot assign to read only propertyjavascript property flagsobject.definepropertieshow to make object immutable javascriptjavascript readonly propertyhidden properties javascript objectenumerable true falseobject.seal examplejavascript const object still mutabledeep freeze javascriptshallow freeze javascriptnon configurable propertycannot redefine propertyjavascript descriptor objectget set javascript objectaccessor descriptor exampleobject.create property descriptorsjavascript property definitionwhy use object.freezeimmutable objects javascriptjavascript interview property descriptorsdefineproperty writable falseobject.keys missing propertiesjson.stringify skips propertiesspread operator non enumerablefor in skips propertiesjavascript internal slots propertiesproperty descriptor defaultsassignment vs definepropertyjavascript strict mode assignment errortypeerror cannot assignobject extensible javascriptreflect.definepropertyjavascript meta programming properties

More tools

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

View all 10+ tools →