Asked by: Duncan Heuwinkelasked in category: General Last Updated: 23rd May, 2020
One may also ask, should you use let or VAR?
let is the new var . Apparently the only difference is that var gets scoped to the current function, while let gets scoped to the current block. And if you want to scope something more finely in an for block or something, then you can do that too. So my instinct is to stop using var altogether when writing ES6 code.