Sometimes I really want this feature in JS: ``` if (let token = http://tokens.next ()) { // token is in scope here } ``` It makes an especially big difference with `else if` Anyone else?
I agree this would be nice (and have definitely wished for it myself). Does it make sense for do-while though? Seems weird.
-
-
I can't find it right now but definitely had a usecase where it would help.
-
Although most people use do-while rather rarely, so I'd be fine if it was omitted :)
- 2 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.