Differences Between var, let, and const

The differences between var, let, and const variable declarations are based on the availability of the block scope, the hoisting effect, the possibility of being resigned and redeclared.

const

cannot be reassignedcan be redeclaredcan have block scopeno hoisting

let

can be reassignedcan be redeclaredcan have block scopeno hoisting

var

can be reassignedcan be redeclareddoes not have block scopehoisted

Thanks for reading.

You can check the differences in detail in the previous article.

Do You Know the Diffe...

 •  0 comments  •  flag
Share on Twitter
Published on May 21, 2021 05:42
No comments have been added yet.