JS: var vs. let?
Posted: Thu Nov 06, 2008 7:08 am
Sorry for the stupid question.
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???
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???