Show newer

@vaporeon_

// i is in scope HERE!!
for (var i = 0; i < 10; i++) {
// ...
}
// i is still in scope!

@vaporeon_ let uses lexical scope. var ignores most blocks aside from function boundaries, and also hoists

@wallhackio @vaporeon_ if you look into the semantic diffurences between for with let and var scoped variables, this is not surpurrising; the furmer is surpurrisingly complicated. const allows fur some optimizations over let though iirc

eeveelution that you would expect to be the cause of a house fire

Show older
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.