Ich hasse Javascript mehr als Pizza ohne Käse!
Conversation
Replying to
Sometimes I just want to yell "Fuck this", but I can't remember what "this" refers to...
2
7
Replying to
Herr JS Profi, könnten Sie mir bitte erklären, wie ich den Variablenwert in den Scope dort hole? 🙏
2
This Tweet was deleted by the Tweet author. Learn more
Danke, aber das bestätigt gerade nur, dass JS kacke ist xD
1
1
Replying to
Jup das ist leider der einzige (möglichst simple) Weg. Andere möglichkeit wäre den Timeout auszulagern und den i zu übergeben. Aber ist halt leider so :/
Unser Bruder muss da echt los...
1
2
Use `let` not `var`. I your brother worked hard to help get this into ES6, where it means that each iteration has its own binding environment, so the closure works as you want it to. Guten Abend!
5
8
42
I didn’t realize that. So JavaScript declaration-site distinctions between let and var are the analog of C++ lambda-site distractions between capture by variable or by value.
3
5
Of languages supporting mutability, only Haskell IORef t and ML t ref are voodoo-free in this tegard. There, identifiers are always bound to constants, and references must be explicitly read and written.
3
3
ofc if everything is immutable then it has the same semantics whether you copy variables into the closure environment or traverse up the scope to get references to them




