Skip to main content

Practice

Unions & Narrowing — Practice

⭐⭐ intermediate~18 min of coding3 challenges

Runtime narrowing: typeof-based formatters, a discriminated-union reducer, and exhaustive switches with a default that throws.

Checking your progress…0%

What you will practice

  1. Narrowing Formatter⭐⭐ intermediate
  2. Discriminated Reducer⭐⭐ intermediate
  3. Exhaustive Switch⭐⭐ intermediate

Need the concept first? Re-read the lesson.