Files
freeCodeCamp/curriculum/challenges/english/blocks/workshop-countup/69447054012a22f38c944ff0.md
T

671 B

id, title, challengeType, dashedName
id title challengeType dashedName
69447054012a22f38c944ff0 Step 2 1 step-2

--description--

Add an if statement inside your countup function.

Check if number is less than 1 and return an empty array.

This will serve as the base case for your recursion.

--hints--

When number is less than 1 the function should return an empty array.

assert.deepStrictEqual(countup(0), []);

When number is not less than 1 the function should not return anything.

assert.isUndefined(countup(1)); 

--seed--

--seed-contents--

function countup(number) {
--fcc-editable-region--
  
--fcc-editable-region--
}