Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 659 Bytes

03-types.md

File metadata and controls

45 lines (32 loc) · 659 Bytes

Chapter 3 -Types

Types

Credits: illustration by unDraw

1. Why NaN is a number?

Example:

typeof NaN; // "number"

TODO: explanation

2. Conversion to String()

Example:

String(null); // "null"
String(undefined); // "undefined"
String([null]); // ""
String([undefined]); // ""

TODO: explanation

3. Conversion to Number()

Example:

Number(null); // 0
Number(undefined); // NaN
Number([null]); // 0
Number([undefined]); // 0

TODO: explanation