Tag
control-flow
Published articles tagged control-flow.
Control flow in JavaScript
if and switch follow C-shaped syntax, but switch uses strict equality and falls through unless you break. Labeled break and continue apply to any statement, not only loops—a feature most statically typed languages omit. Ternary expressions fill the same niche as other languages’ inline conditionals.