3 ms·
(x === 1) && console.log("it's 1") Note that you've saved exactly no keystrokes, although this is composable into expressions (if you are using some Javascript
by rlkf 2y ago
(x === 1) && console.log("it's 1")
Note that you've saved exactly no keystrokes, although this is composable into expressions (if you are using some Javascript-derivative; in ML it would typically already be using the if-form).
- eacnamn 2y ago((x == 1)) && printf 'it'"'"'s 1\n' although I'm not sure how useful this actually is, but it is a nice-to-know
- andrewstuart 2y agoor x === 1 && console.log("it's 1");