Deviopath › TypeScript

Union Types & Narrowing

Easy · Basic Types

Write a function describe that accepts string | number | boolean and returns the type name, a colon, and the value.

Use typeof to narrow the union.

Next: Count a Character