logical operator
🚧 under construction -> example
Last updated
Was this helpful?
🚧 under construction -> example
Last updated
Was this helpful?
⟩ ⟩ ⟩ ⟩ logical ⟩
a && b
:returns a
if a
is falsy, otherwise returns b
.
a || b
:returns a
if a
is truthy, otherwise returns b
.
a ?? b
:returns a
if a
is , otherwise returns b
.
!a
:returns false
if a
is truthy, otherwise returns true
.
&&
and ||
can do short-circuiting.
unlike &&
and ||
, !
always returns true or false.