News for hackers. Stuff that matters.
Re:JavaScript Pattern Matching Proposal by edflsafoiewq on Thursday April 26, 2018 @11:02AM (#16932484)
The default pattern is a variable name.

> [About variable name patterns binding to the name] Eliminates the need for an else/default leg, because assignment to any variable will be sufficient. JS programmers are already used to assigning variables that are then ignored (in functions, in particular), and different people have different tastes in what that should be. _, other, etc, would all be perfectly cromulent alternatives.

There are no comments on this comment yet.