1
00:00:00,510 --> 00:00:01,320
All right.

2
00:00:01,650 --> 00:00:04,170
Let's see how to solve this challenge.

3
00:00:04,620 --> 00:00:13,050
Well, write a function that takes an array of words and retains a new array with all the words that

4
00:00:13,050 --> 00:00:14,760
are three letters or shorter.

5
00:00:14,790 --> 00:00:15,960
So here we go.

6
00:00:16,170 --> 00:00:17,400
My solution.

7
00:00:19,300 --> 00:00:23,320
So accounts let me have my array data here counts.

8
00:00:23,320 --> 00:00:26,770
Array data here is equal to.

9
00:00:28,670 --> 00:00:30,050
Supposed to be strange, right?

10
00:00:30,100 --> 00:00:31,870
So I would say not.

11
00:00:33,430 --> 00:00:36,820
JS Then I would say express.

12
00:00:40,270 --> 00:00:41,940
Express.

13
00:00:41,950 --> 00:00:53,290
J.S. Then let's say React and then CSS and then HTML is enough.

14
00:00:53,620 --> 00:01:02,410
So it says that that function is going to retain the arrays that has three letters or shorter.

15
00:01:02,800 --> 00:01:07,720
And I think we have only this one case, which is three letters.

16
00:01:07,840 --> 00:01:09,300
Let's make it as a four.

17
00:01:09,940 --> 00:01:12,010
Let me just say because of the challenge.

18
00:01:12,130 --> 00:01:13,120
So let's see.

19
00:01:13,150 --> 00:01:17,770
So now if it says that returns a new array.

20
00:01:17,800 --> 00:01:20,780
Definitely I'm I to use filter or map.

21
00:01:20,800 --> 00:01:25,750
If you go back to Advent or we talk about map also for now, theater is a way to go.

22
00:01:26,080 --> 00:01:27,310
So here we go.

23
00:01:28,090 --> 00:01:29,710
So const.

24
00:01:30,910 --> 00:01:32,470
Let's find.

25
00:01:34,740 --> 00:01:36,870
Find three.

26
00:01:39,320 --> 00:01:40,880
Find three letters.

27
00:01:40,930 --> 00:01:41,300
Okay.

28
00:01:41,300 --> 00:01:44,300
So here, pass in my array I want to find.

29
00:01:44,300 --> 00:01:47,300
And then here we go so quickly.

30
00:01:47,630 --> 00:01:55,580
So return from this function quickly and I will say the array I'll pass in dot filter.

31
00:01:57,070 --> 00:01:58,750
My callback function.

32
00:02:00,200 --> 00:02:02,270
And then parentheses.

33
00:02:02,270 --> 00:02:03,230
And then.

34
00:02:03,320 --> 00:02:04,250
Here you go.

35
00:02:04,730 --> 00:02:05,620
Why?

36
00:02:05,870 --> 00:02:07,910
I got this error here.

37
00:02:10,690 --> 00:02:11,590
Syntax.

38
00:02:12,720 --> 00:02:13,060
Oh.

39
00:02:14,040 --> 00:02:15,050
Sorry, guys.

40
00:02:15,060 --> 00:02:15,930
My function.

41
00:02:16,290 --> 00:02:18,020
I thought I'm doing a function here.

42
00:02:18,030 --> 00:02:18,780
Sorry, guys.

43
00:02:19,050 --> 00:02:29,880
So inside here, I'm going to have the three elements, the actual element, the index, the index of

44
00:02:29,880 --> 00:02:31,320
it, and the original area.

45
00:02:31,650 --> 00:02:34,140
But for this one, I only care about the elements.

46
00:02:34,140 --> 00:02:39,750
So inside here, return the element in the array.

47
00:02:39,930 --> 00:02:46,140
If the length is less than or equal to three, then it should return that.

48
00:02:46,140 --> 00:02:46,980
So let's see.

49
00:02:47,280 --> 00:02:55,050
So const result is equal to find three letters and I'll pass in my array data above.

50
00:02:55,560 --> 00:02:59,430
So let's say I want to console.log my result.

51
00:03:00,580 --> 00:03:01,270
Have a look.

52
00:03:02,020 --> 00:03:07,660
Now I have CSIS because CSIS is the one that has less than three or equal to three characters.

53
00:03:07,930 --> 00:03:14,080
If I pass in, let's say, JavaScript, the shortcuts for JavaScript, shorthand, syntax, let's say

54
00:03:14,680 --> 00:03:15,640
I have JavaScript.

55
00:03:15,850 --> 00:03:17,980
If I add, let's say.

56
00:03:21,060 --> 00:03:23,940
MongoDB because MongoDB is less than that.

57
00:03:23,940 --> 00:03:25,530
So it's not a big part of it.

58
00:03:25,770 --> 00:03:27,600
So that is it about this challenge guy.

