WEBVTT

00:00.390 --> 00:04.010
Already it's time for us to make the search actually work.

00:04.140 --> 00:11.070
We are able to grab the user input so we have the Javie and the gender.

00:11.070 --> 00:16.120
I'm just going with the console log entries because we no longer need them.

00:16.230 --> 00:19.940
So I get I get the click event right.

00:19.950 --> 00:26.390
Then I get the gender and the Harveys and I have to find my search criteria.

00:26.400 --> 00:34.500
So basically what I want is to check the gender first and if the gender criteria is satisfied then I'm

00:34.500 --> 00:37.830
going to move on to the obvious criteria.

00:37.830 --> 00:43.170
You could have the whole thing in just one Boulia expression but I'm just going to make it easier to

00:43.170 --> 00:48.810
digest by separating it into two statements so we can have one if statement.

00:48.810 --> 00:57.230
So we're going to check the genders the gender and there's going to be one statement and then inside

00:57.290 --> 01:01.840
we're going to check for the Havi part.

01:02.650 --> 01:10.500
And if all of this is true like if we get all the way to the bottom of this we are going to actually

01:10.580 --> 01:12.530
add that to the search result.

01:12.570 --> 01:15.010
If not then it's not going to be shown.

01:15.270 --> 01:21.720
So for that gender we want to check if the gender is all or the gender is the same as the gender or

01:21.720 --> 01:24.250
the user then that's true.

01:24.570 --> 01:35.670
So gender that's a variable over here that corrupts the user input has to be either all or gender has

01:35.670 --> 01:46.920
to be equal to users current user thought gender so that if we make this true just to try out that the

01:46.920 --> 01:52.660
first criteria if we click search we get all of them right.

01:52.750 --> 01:58.490
But if you are totally female you get the guys and if we click female we get the girls.

01:58.930 --> 02:00.440
So that's working out fine.

02:00.790 --> 02:07.690
Now regarding the second one if Harvey is left empty I just want to show all of them and you are writing

02:07.690 --> 02:13.680
something here and then the hobby has to be the same as that input.

02:14.020 --> 02:25.460
So the hobby can be either empty or can be equal to current uses.

02:25.720 --> 02:35.080
Hoby freed of the page that's a general search first to see what we are dealing with.

02:35.160 --> 02:41.780
See that I only want to find that the people that like pets so I get this through you guys.

02:41.800 --> 02:46.510
What if I want some females that like pets can feel that out.

02:46.780 --> 02:50.100
And if I want to check on all the females then that's it.

02:50.170 --> 02:52.300
That's how it works.

02:52.330 --> 02:59.110
So we've completed this little project this little dating app.

02:59.530 --> 03:07.440
It's more like a working prototype or wireframe with some interactivity.

03:07.450 --> 03:12.910
The way to move forward in this you are on the right path to make mobile apps to make games to make

03:12.910 --> 03:16.040
whatever it is that you want to make with the Web.

03:16.660 --> 03:18.150
But you need to practice more.

03:18.340 --> 03:25.420
So I recommend that you try to create your own little sample app so you get more comfortable with working

03:25.420 --> 03:29.000
with objects with functions with events.

03:29.020 --> 03:34.750
Do some more research and other events that you can use and how to access other properties of the DOM.

03:34.980 --> 03:38.170
And when you're ready just keep on going with our courses.

03:38.170 --> 03:41.670
We have a bunch of more advanced courses.

03:42.220 --> 03:48.040
Once you're comfortable with javascript you're good to get started with game development with app development

03:49.000 --> 03:51.690
and there's just no no limit to the things that you can do.

03:51.690 --> 03:55.320
Once you start learning new things.

03:55.790 --> 03:59.210
So yeah we'll catch you soon.
