+ 3

What is the difference between the LET keyword and VAR keyword

Really want to know which one is preferable

28th Oct 2021, 9:50 AM
othniel john
9 Respuestas
+ 3
What Dylano Zuijderwijk said is correct. Let keyword was introduced in ES6 (6th version of JS) because function scopes was confusing and one of the main bugs of javascript. Because of this it is very uncommon to use var actually
28th Oct 2021, 10:15 AM
Guillem Padilla
Guillem Padilla - avatar
+ 3
othniel john I would also prefer let over var. The below mentioned youtube video might me helpful in identifying the differences between the two. https://youtu.be/XgSjoHgy3Rk
28th Oct 2021, 10:21 AM
Art1mis
0
I think its the same but Modern days prefer LET over VAR, because VAR is Outdated CMIIW
28th Oct 2021, 10:05 AM
Fadlan Kautsar Noer
0
Where is the storage area for let and var type of variable in side system. Does system environment and kernel space is accessible ? It has ability to access system software information through browser and it's plugins. Apologize to put off topic queries.
29th Oct 2021, 4:44 AM
DHANANJAY PATEL
DHANANJAY PATEL - avatar
0
Var is accessible in the whole code while Let is only accessible inside the block/scope it was defined
29th Oct 2021, 6:24 PM
Paul Ndambo Ngila
Paul Ndambo Ngila - avatar
0
Hello
27th Dec 2021, 6:04 AM
Ахмад Баходинов
Ахмад Баходинов - avatar
0
памагайт у меня variables
27th Dec 2021, 6:05 AM
Ахмад Баходинов
Ахмад Баходинов - avatar