Last active
February 27, 2019 07:35
-
-
Save itsrachelfish/583209477f038102da7585be6397259d to your computer and use it in GitHub Desktop.
teaching woodcat how to javascript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> var test = obj.a - obj.c; | |
undefined | |
> typeof test; | |
'number' | |
> isNaN(test); | |
true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> var a = 2; | |
undefined | |
> var b = 3; | |
undefined | |
> a + b; | |
5 | |
> b - a; | |
1 | |
> b - c; | |
ReferenceError: c is not defined | |
> var obj = {a: 2, b: 3}; | |
undefined | |
> obj.a + obj.b; | |
5 | |
> obj.a - obj.b; | |
-1 | |
> obj.a - obj.c; | |
NaN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment