Skip to content

Instantly share code, notes, and snippets.

View abhilive's full-sized avatar

Abhishek Srivastava abhilive

View GitHub Profile
@getify
getify / gist:5285514
Last active January 7, 2024 11:58
since `let (foo = 42) { ... }` is not coming to ES6 after all...

I hereby propose this form of let usage as the next best option, since the clearly better let (foo = 42) { ... } let-block-statement syntax is dead and not coming to ES6:

/*let*/ { let foo = 42;

   // your code that uses `foo`

}