Closed markdessain closed 8 years ago
As you have noticed sometimes you want to have a variable that starts off without a value. Thankfully programming languages have a way to do this.
The value null represents the intentional absence of any object value.
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/null https://docs.python.org/2/library/constants.html#None
(I know, why are all languages different!!)
These two statement are actually the same. The ! means not. So we are saying
not
# does sign not have a value !sign
which is the same as saying
# is sign equal to null sign===null
But pleaes pick which ever makes more sense to you!
I've include the highlighted code, hopefully that all makes sense.
1. "Nothing" or null
As you have noticed sometimes you want to have a variable that starts off without a value. Thankfully programming languages have a way to do this.
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/null https://docs.python.org/2/library/constants.html#None
(I know, why are all languages different!!)
2. sign===null or !sign
These two statement are actually the same. The ! means
not
. So we are sayingwhich is the same as saying
But pleaes pick which ever makes more sense to you!
I've include the highlighted code, hopefully that all makes sense.