Learn JavaScript

Lesson 8 of 9 · Types, Operators and Coercion: Why '5' + 2 Is Not 7

Module 2 · Types, Operators and Coercion: Why '5' + 2 Is Not 7

Cheat Sheet: Types, Operators and Coercion on One Page

ProReading

This page is the module on one screen, for the moment you need a rule fast. That moment comes in a code review, before an interview, or halfway through a judged problem. It adds nothing new. Every line comes from lessons 01 to 06, and each table names the lesson that explains it.

Checking what this lesson needs for you…

What is inside Cheat Sheet: Types, Operators and Coercion on One Page

  1. The seven primitives and object
  2. The operators, in precedence order
  3. The + rule and the rule for the others
  4. The converters
  5. The falsy values
  6. Three kinds of equal
  7. The four judgement calls
  8. The ten output puzzles

Module test

Ten questions on this module. Pass at 70%, and you can take it as many times as you like.

Take the module test