
·10 min read
const vs Immutability in JavaScript: The Binding, Not the Value
Understand JavaScript immutability: the precise difference between variable binding with const and object mutability with Object.freeze and deep freeze.
Stories, tutorials, and deep dives spanning across diverse worlds.

Understand JavaScript immutability: the precise difference between variable binding with const and object mutability with Object.freeze and deep freeze.

const chỉ ngăn việc gán lại biến, không ngăn việc thay đổi nội dung của object - phân biệt chính xác và dùng để làm gì cho đúng.