Command Palette

Search for a command to run...

Hectal
Phase 1: Values, Types and Variables
JavaScript · Exercise 2 of 5 PreviousNext
Beginner

Write a type report

The starter declares five values. Fill each <span> with the type of the matching value, using typeof.

Two values need special care: typeof null says object and so does typeof an array. For c, show null, and for d, show array. Use === null and Array.isArray for those two.

What Check tests

  1. a shows string
  2. b shows number
  3. c shows null
  4. d shows array
  5. e shows bigint
  6. The code uses typeof, === null and Array.isArray

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

Runs in your browser. Your code is saved here.

Your page

Press Run to see the page.

Console

Nothing logged yet.