Engrain by ByteRush

JS.05 5 concepts · 4 ready

Types, values and coercion

Predict type conversion and equality, and handle numbers correctly.

  1. JS.05.01Primitive types and `typeof`CoreJunior8 min
  2. JS.05.02Type coercion and ToPrimitiveCoreMid-level10 min
  3. JS.05.03Equality: ==, ===, Object.is, SameValueZeroCoreMid-level10 min
  4. JS.05.04Numbers: floating point, BigInt and precisionCoreMid-level11 min
  5. JS.05.05Symbols and well-known symbolsMid-levelBeing written

Interview questions in this module

  1. What are the primitive types in JavaScript?
  2. Why is typeof null "object"?
  3. Explain how == works. Why is [] == false true?
  4. Why is 0.1 + 0.2 !== 0.3? How do you compare floats or handle money?
  5. What is the difference between Object.is and ===?
  6. What does [] + {} evaluate to and why?
  7. What is NaN? How do you check for it?
  8. When would you use BigInt?
  9. What are Symbols used for?