All right.
Let's see how to solve this challenge.
Well, write a function that takes an array of words and retains a new array with all the words that
are three letters or shorter.
So here we go.
My solution.
So accounts let me have my array data here counts.
Array data here is equal to.
Supposed to be strange, right?
So I would say not.
JS Then I would say express.
Express.
J.S. Then let's say React and then CSS and then HTML is enough.
So it says that that function is going to retain the arrays that has three letters or shorter.
And I think we have only this one case, which is three letters.
Let's make it as a four.
Let me just say because of the challenge.
So let's see.
So now if it says that returns a new array.
Definitely I'm I to use filter or map.
If you go back to Advent or we talk about map also for now, theater is a way to go.
So here we go.
So const.
Let's find.
Find three.
Find three letters.
Okay.
So here, pass in my array I want to find.
And then here we go so quickly.
So return from this function quickly and I will say the array I'll pass in dot filter.
My callback function.
And then parentheses.
And then.
Here you go.
Why?
I got this error here.
Syntax.
Oh.
Sorry, guys.
My function.
I thought I'm doing a function here.
Sorry, guys.
So inside here, I'm going to have the three elements, the actual element, the index, the index of
it, and the original area.
But for this one, I only care about the elements.
So inside here, return the element in the array.
If the length is less than or equal to three, then it should return that.
So let's see.
So const result is equal to find three letters and I'll pass in my array data above.
So let's say I want to console.log my result.
Have a look.
Now I have CSIS because CSIS is the one that has less than three or equal to three characters.
If I pass in, let's say, JavaScript, the shortcuts for JavaScript, shorthand, syntax, let's say
I have JavaScript.
If I add, let's say.
MongoDB because MongoDB is less than that.
So it's not a big part of it.
So that is it about this challenge guy.