fix(learn): clarify test description for Use Rest Parameter with Function Parameter (#40725)

* fix: clarify test description

* fix: improve wording regarding rest parameters syntax

Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>

* fix: improve with better sounding wording

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>

Co-authored-by: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
This commit is contained in:
gikf
2021-01-24 17:30:13 +01:00
committed by GitHub
parent 96753ddca4
commit d41630ee19

View File

@ -52,7 +52,7 @@ The result of `sum()` should be 0
assert(sum() === 0); assert(sum() === 0);
``` ```
The `sum` function should use the `...` rest parameter on the `args` parameter. `sum` should be an arrow function which uses the rest parameter syntax (`...`) on the `args` parameter.
```js ```js
assert(__helpers.removeWhiteSpace(code).match(/sum=\(\.\.\.args\)=>/)); assert(__helpers.removeWhiteSpace(code).match(/sum=\(\.\.\.args\)=>/));