Re:Using the switch(true) pattern in JavaScript
by deergomoo on Monday April 12, 2021 @06:03PM
(#26785741)
> Along with switch being as expression
Even PHP has this now, albeit with a different keyword (match) due to existing switch semantics being pretty bad
Re:Using the switch(true) pattern in JavaScript
by jessaustin on Monday April 12, 2021 @05:23PM
(#26785383)
I really want... switch being as expression.
Unfortunately JavaScript still hasn't caught up with CoffeeScript.
I really want this. Along with switch being as expression. Seems like something that JavaScript is obviously missing.