@vaporeon_ it's even worse than you think! javascript has what is effectively a preprocessing phase where it looks for every single value initialized as a var
and initializes them, and then the interpreter runs on the code like you would expect
this means you can use a variable before it is declared if you declare it with var! real javascript code out in the wild actually does this!!!!
@wallhackio @vaporeon_ yeah
var
is one of those early design decisions with surpurrisingly frustrating implications fur js implementations because it makes it impawsible to reliably parse in linear time—if you come across what may be an identifier, you do not know until later whether it is actually refurring to something or not