0
Q:

what is the difference between let and const in javascript

The difference is that with const you can only only assign a value to a variable
once, but with let it allows you to reassign after it has been assigned.
1
`const` is a signal that the identifier won't be reassigned.

`let` is a signal that the variable may be reassigned, such as a counter in a
loop, or a value swap in an algorithm.

It also signals that the variable will be used only in the block it's defined
in, which is not always the entire containing function.
3

New to Communities?

Join the community