Nick Krempel (2013-11-29T16:29:48.000Z)
domenic at domenicdenicola.com (2013-12-10T01:40:16.383Z)
Couldn't find anything on this in the archives, but is there a proposal for: ```js if (let var = expr) { // var in scope } else { // var in scope } // var out of scope ``` i.e. shorthand for: ```js { let var = expr; if (var) { // ... } else { // ... } } ``` Also: ```js switch (let var = expr) { case foo: // var in scope default: // var in scope } // var out of scope ``` ...which has a similar expansion. Similarly for "while" and "do...while": this would bring everything in line with the current "for" / "for in" / "for of". This also matches what C++ allows, with the exception of "do...while" (in our case, it seems acceptable to allow "do...while" too - the value would simply be "undefined" on the first iteration). ("const" should also be OK in place of "let", at least for "if" and "switch".)