FireEdgeX
0
All tracksJavaScript

LESSON 03 ยท JAVASCRIPT

Conditions and decisions

Conditions let a program choose a path based on a true-or-false test.

7 min readIn progress

THE IDEA

Understand the concept

An if statement runs a block when its condition is truthy; else provides another path. Keep conditions explicit and order related cases carefully so a broad condition does not hide a more specific one.

WORKED EXAMPLE

See it in context

Example