Preventing Data From Mutation with Freeze Method (javascript mutation)
|

Preventing Data From Mutation with Freeze Method (javascript mutation)

In JavaScript, we declare variables with CONST when we want to protect it from mutation. But CONST declaration alone is not enough to protect really. Firstly let’s see data protection with CONST: As you see there is an alternative way to mutate CONST data. So what about if you really wat your data to be…