1.

What is the difference between "var" and "let" Keywords?

Answer»

Both are USED for function DECLARATION in JavaScript but the difference are given below :-

 letvar
1.It can be only AVAILABLE INSIDE the SCOPE it's declared, like in for loop.It can be accessed outside the loop.
2.It is block scoped.It is function scoped


Discussion

No Comment Found