Command Palette

Search for a command to run...

Hectal
Phase 17: Storytelling and Scrollytelling
Data Visualization · Exercise 6 of 6 Previous
Advanced

Say every number in words

A screen reader only hears the text. missingNumbers(labels, text) should return the numbers that appear in the chart's labels but not in the step's text, so the page can fail a check.

It currently returns an empty list always. Return, in order, every number (digits and commas, such as 4,380) in the labels that text does not contain. A label with no digits adds nothing.

What Check tests

  1. Finds the numbers the text leaves out
  2. Numbers that the text says are not reported
  3. A label with no digits and an empty list are fine
  4. A number with a comma stays one number

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.

Console

Nothing printed yet.