add
function so it uses currying to add parameters x
, y
, and z
.
add(10)(20)(30)
should return 60
.
testString: assert(add(10)(20)(30) === 60);
- text: add(1)(2)(3)
should return 6
.
testString: assert(add(1)(2)(3) === 6);
- text: add(11)(22)(33)
should return 66
.
testString: assert(add(11)(22)(33) === 66);
- text: Your code should include a final statement that returns x + y + z
.
testString: assert(code.match(/[xyz]\s*?\+\s*?[xyz]\s*?\+\s*?[xyz]/g));
```