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:
Ilenia 2025-10-29 11:20:35 +01:00 committed by GitHub
parent d7268ed64a
commit c503861b68
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.