4 ms·
As opposed to what other language?
by pdpi 8y ago
As opposed to what other language?
- soneca 8y agoMaybe not opposed to any language.
- afandian 8y agoNot GP but variable scope in JS is very different to e.g. C, C#, Java etc. Superficially it appears similar, but the syntax is a faux amis.
- pjmlp 8y agoIs is very similar to Lisp, Clipper or Perl, also known in CS circles as dynamic scope variables.
- edflsafoiewq 8y agoJS's scope is really weird for (let i = 0; i != 3; i += 1) { console.log(i); // i refers to the variable defined below const i = 0; }