Data Visualization · Exercise 1 of 6Next
Beginner
A headline that can say nothing
finding(a, b) takes two lists of daily rides and should return a headline such as 2.5 times. With an empty list or a base of zero it returns NaN times or Infinity times.
Make it return null when either list is empty, or when the average of b is 0. Keep the normal case.
What Check tests
- The normal case still works
- An empty list gives null
- A base of zero gives null
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.
Press Run to see the page.
Console
Nothing printed yet.