Types, values and coercion
Predict type conversion and equality, and handle numbers correctly.
- JS.05.01Primitive types and `typeof`CoreJunior8 min
- JS.05.02Type coercion and ToPrimitiveCoreMid-level10 min
- JS.05.03Equality: ==, ===, Object.is, SameValueZeroCoreMid-level10 min
- JS.05.04Numbers: floating point, BigInt and precisionCoreMid-level11 min
- JS.05.05Symbols and well-known symbolsMid-levelBeing written
Interview questions in this module
- What are the primitive types in JavaScript?
- Why is
typeof null"object"? - Explain how
==works. Why is[] == falsetrue? - Why is
0.1 + 0.2 !== 0.3? How do you compare floats or handle money? - What is the difference between
Object.isand===? - What does
[] + {}evaluate to and why? - What is
NaN? How do you check for it? - When would you use BigInt?
- What are Symbols used for?