Hey, and welcome back.
What does it mean if a variable has a value of NULL.
So if I was doing some kind of, or some kind of arithmetic, and I was using NULL, it would behave just as zero.Watch Full Course >>
So let’s see this and we leave it here in Scratchpad.
So if I come here, let me delete all of this.
So let’s say ‘var’, ‘var’ let’s call variable var tax=null; and then ‘alert’, let’s do some kind of arithmetic.
So let’s say null times, times 10,000 and then we run this, you see it’s equal to zero, because it’s treated as zero.
So we can also say ‘null+10,000’, if we run this, it’s 10,000.
So null is treated as zero.
Let’s continue in the next video.
And in the next video, we’ll start looking at variable hoisting.
See you then.Watch Full Course >>
Latest posts by Ricky Wahowa (see all)
- How to create Landing Pages in Mailchimp [Video included] - February 17, 2018