This is the ultimate conditional syntax:
if (x === 1) console.log(“it’s 1”)
The “if” bothers me though, be nice not to have it. if (x === 1) console.log(“it’s 1”)
The “if” bothers me though, be nice not to have it. (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).x === 1 && console.log("it's 1");