Caffeinated Coder
Book an appointment
Lesson 02 · Basics

Values and types

Every value in JavaScript has a type: a number, a string of text, a boolean and five more. Follow one variable through a ten-line script as it holds 42, then "42", then true, and watch typeof report each type, + join text instead of adding, and Number() convert a string back into a number.

9 min10 steps5 questionsBeginner
Fig 2 · Interactive
Loading figure…
or ← →

Quiz Unlocks after the last step.