JavaScript Essentials

Lesson 03 · 11 min

Conditions and comparisons

Half the bugs here aren't in the if but in how JS compares values.

Code has to branch: give a discount on a big order, show a placeholder when there's no data. The tool is if. The difficulty isn't in it, but in what counts as equal and what counts as true.

Sign in to continue

The rest of this lesson opens after sign up

The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.