const doesn't make objects immutable
@ssnarwhal0555-ctrl▲ 6 net votes
const stops reassignment of the variable, not changes to the object. Use Object.freeze for shallow immutability.
4 COMMENTS
Notable
Illuminating
Saved
A crisp explanation of a common JavaScript gotcha. The distinction between binding and object mutability is especially useful.