JavaScript: Object.isSealed
Object.isSealed(obj)
-
Return
true
if object obj is sealed, elsefalse
.
[see Object.seal]
[see Prevent Adding Property]
const x3 = {}; console.log(Object.isSealed(x3)); // false Object.seal(x3); console.log(Object.isSealed(x3)); // true