0:08
in this video we are going to see the
0:10
difference between null and undefined in
0:16
whenever we declare a variable
0:19
and if you don't use equal to operator
0:22
and assign any value then it is
0:25
undefined so no values are assigned to
0:28
it even null is a value but it is not
0:32
in the same way if I declare a variable
0:35
and then if I use equal top return and
0:37
use null as the value then it is null it
0:40
means that the value is null
0:43
the null and undefined are similar
0:47
and the both means an absence of value
0:51
that particular variable in the storage
0:56
if we reference that variable it it is
1:00
not going to have any value in it
1:03
if we use double equal to operator that
1:10
they are same so for example
1:17
undefined this will return true because
1:24
cases the the value is not present the
1:29
value is absent so let's copy this
1:34
so this will return true for me see it
1:38
returned true because I am using
1:45
meaning there is the there is absence of
1:49
but let's use strict equality operator
1:53
console.log null strict equality
1:56
operator undefined this will Define this
2:00
this will return false because
2:03
the type is not the same
2:09
it has been set the value the variable
2:12
value has been set to null but undefined
2:14
means it has not been set so let's run
2:20
this will return false when we use
2:22
strict equality operator
2:25
so both the null and undefined are equal
2:28
when we use equality operator it means
2:31
that there is absent of value
2:35
both the null and undefined are not null
2:38
if you use strict equality operator
2:41
a variable value has been assigned as
2:44
null but undefined means it was not at
2:47
all assigned any value not even null
3:00
please check the video description
3:06
From the Block first you can get this
3:08
sample quotes consult dots log
3:11
statements and explanation
3:13
and you can reference it
3:18
this is most commonly asked
3:25
so have a better understanding of it
3:29
so that it will prove your JavaScript
3:40
I hope it was helpful
3:50
thank you for watching