What is the difference between let, var and const keyword in JavaScript ?
Answers (1)
Add AnswerVar | Let | Cosnt |
A var variable’s scope is functional scope. | A let variable’s scope is block scope. | A let variable’s scope is block scope. |
It is possible to update and re-declare it in the scope. | It can be modified, but not re-declared in the scope. | It cannot be changed or added to the scope. |
It can be defined without being initialized. | It can be defined without being initialized. | It cannot be defined without first being initialized. |