Re:Using the switch(true) pattern in JavaScript
by pxx on Monday April 12, 2021 @03:07PM
(#26783694)
In perl you would want to use `or` instead of `||` to take advantage of the low precedence, so you can type things like `dostuff $foo or die` which is logically 'do stuff, and if it fails, die' as opposed to 'die if $foo is false', which you'd get with ||
[ Parent
| on HN ]
There are no comments on this comment yet.