DEV Community


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

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 :)

ip127001 profile image
Rohit Kumawat Author

Thanks for reading the article and observing the mistake.