3 ms·
Not 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.
by afandian 8y ago
Not 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; }