🚧 under construction
Last updated 2 years ago
Was this helpful?
⟩ ⟩ ⟩ ⟩ if
(statement)
if (condition) statement // one-way branch if (condition) statement1 else statement2 // two-way branch
else clause is part of the nearest if statement.
if (expr1) statement1 // not this one if (expr2) statement2 // ... is part of this if statement else statement3 // else clause ...
switch - multiway branches.
falsy values.
JavaScript: The Definitive Guide ⟩ 5.3.1 if
⟩ ⟩ if