That’s… strange. Normally it’s the other way around, unless you are doing something unusual, since let has block scope, and var has function scope. Those error normally come from using var as the variable then get’s “hoisted” and so becomes visible before the variable is actually declared.
That’s… strange. Normally it’s the other way around, unless you are doing something unusual, since
let
has block scope, andvar
has function scope. Those error normally come from usingvar
as the variable then get’s “hoisted” and so becomes visible before the variable is actually declared.Anyway, good that you were able to figure it out.