Yes let and const are part of es5 and they are used in modern JS code, however, there is still a lot of old code written with var.
I am sharing the basics of variables from Vanilla JS.
Well, const is mainly used to prevent reassigning and overriding its value.
let is used mostly in loops because the counter value has to be reassigned every time.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yes let and const are part of es5 and they are used in modern JS code, however, there is still a lot of old code written with var.
I am sharing the basics of variables from Vanilla JS.
Well, const is mainly used to prevent reassigning and overriding its value.
let is used mostly in loops because the counter value has to be reassigned every time.