Freeze An Object, Sorta
> const things = {one: "two", hello: "world", cats: ["Von Neumann", "Sosa"]}
undefined
> Object.freeze(things)
{one: "two", hello: "world", cats: Array(2)}
> things.one = "three"
"three"
> things.dogs = []
[]
> delete things.hello
false
> things
{one: "two", hello: "world", cats: Array(2)}
> things.cats.push("Sneaky")
3
> things
{one: "two", hello: "world", cats: Array(3)}Last updated