This is going to be a quick lesson on great filter method, so the ray filter method creates a new array
with all elements that pass the test implemented by the provided function.
So we saw with find we could only get one value being returned back.
And in this case with Filter, this gives us an option to construct a brand new array with the results.
So we run this.
We are looking for words with a length that is greater than six and it's returning back a brand new
array as result with those new word and those values contained.
So the objective challenge for this lesson is to create a new array using that existing array or one
that you create with numbers that are greater than 75 output into the console once you've returned back
those results.
So pause the video.
I'll say the solution coming up.
So within the coding, we're going to use one of the rays that we had earlier and creating a variable
called result.
We want to filter through the Mihiri two, because this is the one that's got all of the numbers that
are contained within it, writing up the function.
And we can just have no value there as the argument.
And then again, we can consider log out the number.
And the interesting thing one here is that we're actually going to go through all of them.
So it's not going to stop, as the find did when we actually found that value.
So take a look through and we'll return back all of the ones that are larger than seventy five.
And then afterwards, we'll take a look at what's contained within result.
And I want to add in a few more so that we've got some more numbers that are large and this should actually
be numb.
So when we refresh, you can see it goes through all of the values in the array and then it constructs
that Nuri called result with only the values that met the criteria.
So the same that's fine, but gives us the ability to construct a brand new array that matches that
criteria to try to.