0

What is different between var and let in JavaScript

*I’m learning JavaScript and I’m confused between `var` and `let`. Can someone explain the difference between them with examples? Also, when should I use one over the other?

3rd Jul 2025, 3:19 PM
illegalperson46
illegalperson46 - avatar
1 Answer
+ 6
https://www.w3schools.com/js/js_let.asp This explains the purpose of both with examples
3rd Jul 2025, 3:30 PM
Afnan Irtesum Chowdhury
Afnan Irtesum Chowdhury - avatar