+ 1
What is the difference between var and let ?
In javascript it simply defines var=(variable),so what is the "let",and the output between those two are not equal when take together... So please explain me what it is,and what is the difference between those two and most probably where to use them commonly..🤔. 😇🙂😇
2 odpowiedzi
0
In simple words , any variable declared using var keyword can be used anywhere in the program.
And any variable declared using let keyword could be accessed/used/modified only within the scope in which it is declared ....