I understand the block vs. function scoping of let & var (or I thought I did). Recently I ran across some JavaScript that used let in function scope where I thought it would be equivalent to using var, like:
function xyz ( abc ) {
let mno = abc - 1; /* or whatever */
...
}
Is there any functional difference between that and using var there? Or is it just a stylistic thing?
varshould never have been in the language, and would useletin all cases, as promoting good practices.