Implement an Element Skipper - Implement an Element Skipper

Tell us what’s happening:

Unbelievable… i do not understand the task at all.
I have no idea… Its impossible to learn this way, We did not have this information…

Your code so far


Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36

Challenge Information:

Implement an Element Skipper - Implement an Element Skipper

you need to remove the elements from the array that are before the first element that return true when tested, and keep that element that returns true and the rest of the array

if you want to request that the description be rewritten for clarity you can open an issue on github

Thank you for helping make FCC better. Bugs can be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.

1 Like

Whenever I’m unclear about what the task is, I look at the tests. That always seems to clear up any doubts for me.

execuse me i’ve the same problem as he has, and i can’t solve it as well , now i know what i need but i donno how to execute it as well

1 Like

Let me try to help you without harming your learning. Try checking all possible loop options, you know from the previous lessons that loops are used to iterate through data structures that are collection of data, like arrays.

Loops can be a real problem if not handled correctly, one of the most common issues are infinite loops. In this exercise you need to traverse the Array right? If you think about it, you have to collect relevant data to help you solve the problem, like:

  • How long do i need to traverse the array?
  • How many elements does the example contain?
  • Is there anything that can give you the number of elements your array contain?

Once you find your answer think about the conditions the loop has to obey in order to stop at the point you need. Last thing you would like to know is how to exit the loop efficiently. Does every loop technique stop if you use return or break?

You can use some debbugging techniques to find if the loop continues or not, like using console.log inside the loop scope. experiment with that as that’s the point in doing these exercises, not learning the pattern but learning how to think out solutions using what you have learnt along the way :slight_smile:

2 Likes

i’d like to thank you much for your efforts to help me, yes man i had an idea about all what you said but i was like mind-stopped-working condition,
but you all pushed me so i passed it, thank you all .

2 Likes