No. var is function scoped.
In modern JavaScript, let and const are generally preferred over var.
The variable reference cannot be reassigned, although object contents may still be modified.
No. let cannot be redeclared within the same scope.
Browse all our FAQs or reach out to our support team
Your learning library
Find your next course. Build something great.
LEARN. BUILD. GROW.