Skip to main content

Harshal V. LADHE

JavaScript Strict Mode

How `"use strict"` changes JavaScript's behaviour, turning silent failures such as writes to frozen objects into thrown errors.

Content tagged strict-mode

  • Snippet:Deep Freeze Objects in JavaScript

    Recursively lock every object level for true immutability
    Lock objects and their children immutably — prevent accidental mutations and enforce deep immutability in strict mode.
    Published at:
    Categories:JavaScript
    Estimated reading time:2 min read