&& and || as conditional statements

suggest change

The operators || and && short-circuit. || skips the right-hand side when the left-hand side is truthy, and && skips it when the left-hand side is falsy. That can express a short conditional. In a browser:

const x = 10

x == 10 && alert("x is 10")
x == 10 || alert("x is not 10")

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents