Facebook Pixel

Can const variables be changed?

The variable reference cannot be reassigned, although object contents may still be modified.

Verify This Answer

Cross-check this information using these trusted sources:

More FAQs in What Is the Difference Between var, let, and const?

In modern JavaScript, let and const are generally preferred over var.

No. var is function scoped.

No. let cannot be redeclared within the same scope.

Still have questions?

Browse all our FAQs or reach out to our support team

Want to upskill yourself?

Our courses are taking a Coffee break, but your curiosity shouldn't. Stay engaged with namastedev linkedin, youtube, discord and other resources while you wait.

0
Please Login.
Please Login.