0
lain posted
difference between var statement and let statement in JavaScript ?
what is the difference between var statement and let statement in JavaScript ?
var var_name='arrayoverflow';
let let_name ='arrayoverflow';
console.log(var_name);//arrayoverflow
console.log(let_name);//arrayoverflow
both seems to work same. both , var and let statement define the variable and work same so what is the difference between var statement and let statement in JavaScript ?
var VS let
list all pros and cons also so i can use both with wise