1.0 KiB
1.0 KiB
title | id | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
Accumulator factory | 594810f028c0303b75339ace | 5 |
Description
undefined
Instructions
undefined
Tests
tests:
- text: ''
testString: 'assert(typeof accumulator === "function", "<code>accumulator</code> is a function.");'
- text: ''
testString: 'assert(typeof accumulator(0) === "function", "<code>accumulator(0)</code> should return a function.");'
- text: ''
testString: 'assert(typeof accumulator(0)(2) === "number", "<code>accumulator(0)(2)</code> should return a number.");'
- text: ''
testString: 'assert(testFn(5) === 5.5, "Passing in the values 3, -4, 1.5, and 5 should return 5.5.");'
Challenge Seed
function accumulator (sum) {
// Good luck!
}
After Test
console.info('after the test');
Solution
// solution required