DEV Community

loading...

Discussion on: What is the difference between var, let, and const declarations?

Collapse
bigpresh profile image
David Precious • Edited

In Q2,

const a = 5; a = 10; SyntaxError: Missing initializer in const declaration

... I think you mean TypeError: Assignment to constant variable there :)

Collapse
ip127001 profile image
Rohit Kumawat Author

Thanks for reading the article and observing the mistake.