Browsing through different JS-scripts I see that locally used variables are sometimes declared with var and sometimes with let, and myself I seem to have used them quite interchangeably. However, I seem to recall Ahruman explaining that one of them is not good and discouraged for some reason. But which?
EDIT: And while I am posting this, Safari quits unexpectedly and violently. Oops? Have I pissed off the invisible powers of programming???
let is added to the is vocabulary in a later JS version. It wasn't always there. In most cases both are interchangeable. let is a bit more local valid. You can redefine a value within a loop with a let statement and it starts using the old value after the loop. But in this way we never use it.
When you look inside the widgets on a mac you see that they are also programmed in JS (At least a large part of them). There you only see the use of var. let is never used and according to Ahruman its use could change or end in future.