1
00:00:00,540 --> 00:00:01,740
Hello and welcome.

2
00:00:01,740 --> 00:00:12,110
In this fit you are be introducing you to the javascript logical operators javascript logical operators

3
00:00:12,310 --> 00:00:19,780
who are used to determine the logic between variables or values.

4
00:00:20,290 --> 00:00:26,150
So this is a basic table chores due to logical operators.

5
00:00:26,160 --> 00:00:33,510
The first is called The Ant and is represented by the assigned symbol.

6
00:00:33,900 --> 00:00:39,080
What that does it checks if all the conditions are met.

7
00:00:39,390 --> 00:00:43,100
And it will return boolean result.

8
00:00:43,170 --> 00:00:45,230
Either true or false.

9
00:00:45,300 --> 00:00:49,460
If all the conditions are met it will return true.

10
00:00:49,590 --> 00:00:52,360
If not Ireton is false.

11
00:00:52,410 --> 00:00:58,700
The links is the OR operator which is represented by the pipe symbol.

12
00:00:58,710 --> 00:01:07,190
He checks if any condition has been met and it will return a true boolean result.

13
00:01:07,260 --> 00:01:15,270
So the key distinction between the and the or is that when are using it and to check conditions or the

14
00:01:15,270 --> 00:01:24,000
conditions has to evaluate to true if they are not met then it will return false Boolean result unresolved

15
00:01:24,000 --> 00:01:28,620
bisk remains true or false in the operator.

16
00:01:28,800 --> 00:01:31,820
You only have to satisfy one condition.

17
00:01:31,890 --> 00:01:35,440
It will return true result.

18
00:01:35,490 --> 00:01:42,860
So let me quickly illustrate how the logical operators are used in the console.

19
00:01:43,050 --> 00:01:49,430
So I'm going to start by creating a couple of variables with variable X..

20
00:01:49,650 --> 00:01:53,700
I give it a value of 7.

21
00:01:54,000 --> 00:01:56,710
Great are not a variable.

22
00:01:56,910 --> 00:02:11,370
When a call is variable y and I give it a value of 6 now I can use the logical operators to check the

23
00:02:11,370 --> 00:02:18,410
condition so I can see X is less than 10.

24
00:02:18,420 --> 00:02:35,370
If X is less than 10 and Y is greater than 6 this will evaluate to be false because the first condition

25
00:02:35,370 --> 00:02:36,260
is true.

26
00:02:36,600 --> 00:02:45,960
X is less than 10 but the second condition is false because Y is not greater than 6 so it would evaluate

27
00:02:46,320 --> 00:02:48,050
to be false.

28
00:02:48,360 --> 00:02:57,450
So if I use the OR operator with the same condition it will return true because one part of the condition

29
00:02:57,870 --> 00:02:58,610
is true.

30
00:02:58,830 --> 00:03:01,060
So it will return everything as true.

31
00:03:01,080 --> 00:03:16,530
For example the same illustration if I come in and say X is less than 10 or Y is greater than 6.

32
00:03:16,530 --> 00:03:24,480
This will evaluate to be true because the first part of the condition is true X is less than 10.

33
00:03:24,750 --> 00:03:32,730
So that's basically how you use a logical operator in a nutshell.

34
00:03:32,730 --> 00:03:41,730
Once you understand this basic use of it then it will be able to make more sense when you start using

35
00:03:41,730 --> 00:03:43,030
it later.

36
00:03:43,350 --> 00:03:45,490
Thank you for watching and bye for now.
