However, in case you are here only for the solution use this link.
Table of Contents
- Code & Explanation
- Other Related Concepts
arrayrefers to the original array that you are looking to filter.
function- Required. A function or search criteria that would be used to filter each value in the array
value- Required, the value if current element in the iteration
index- Optional, in case you would like to start the iteration from a specific index
arr- The array object being called upon
thisValue- Optional, and as the name suggests, the value present would be passed in case the parameter is empty.
As you could see, we have defined a function that returns values that are greater than or equal to
0. In case you are comfortable with arrow functions you can use them to make your code more readable.