0

I knew that we should use Let in case the variable we need to create will be reassigned another values but what is different from use var as below will resulted to same output & result:

let price;
console.log(price);    // Output: undefined

var result;
console.log(result)    // Output: undefined

Finally, Shall we always use Let & to avoid using var forever especially after ES6 updates or is there any use for Var that we should stick to ?

Saoud ElTelawy
  • 197
  • 1
  • 3
  • 15

0 Answers0