JavaScript | Variables and Data Types | Question 5

Last Updated :
Discuss
Comments

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

var is block-scoped, let and const are function-scoped.

var is function-scoped, let and const are block-scoped.

var and let are block-scoped, const is function-scoped.

All are block-scoped.

Share your thoughts in the comments