mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-28 21:00:56 +08:00
feat(curriculum): add example to element skipper lab (#63079)
Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com>
This commit is contained in:
parent
d7268ed64a
commit
c503861b68
@ -7,7 +7,9 @@ dashedName: implement-an-element-skipper
|
||||
|
||||
# --description--
|
||||
|
||||
In this lab you will create a function that skips elements in an array based on a specified step value.
|
||||
In this lab you will create a function that skips elements in an array until it finds an acceptable one based on a specific test function.
|
||||
|
||||
For example, for an array like `[1, 1, 1, 2, 1, 1, 1]` and a test function `function(n) {return n === 2}`, the first element that is acceptable for this is the one at index 3, so all the elements before that need to be discarded, and the output should be the remaining elements `[2, 1, 1, 1]`.
|
||||
|
||||
**Objective**: Fulfill the user stories below and get all the tests to pass to complete the lab.
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user