What is the difference between var, let, and const?

Instruction: Compare scope, reassignment, initialization, and mutation of const objects.

Context: Explain JavaScript variable declarations and why const does not make an object immutable.

Updated

Official answer available

Read the opening below, then unlock the full answer and practical guidance.

var belongs to its enclosing function or class static initialization block, or otherwise to the top-level script/module scope; a top-level module var is not...

Related Questions