Web Core Lesson 1 of 8

if and else in JavaScript

30 min, 5 exercisesCode

JavaScript counts 0 and an empty string as equal, and sooner or later an if statement trips over it.

The rest of this lesson is locked.

5 exercises, checked as you type.

Sign in

JavaScript