Skip to content

Instantly share code, notes, and snippets.

@itsrachelfish
Last active February 27, 2019 07:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itsrachelfish/583209477f038102da7585be6397259d to your computer and use it in GitHub Desktop.
Save itsrachelfish/583209477f038102da7585be6397259d to your computer and use it in GitHub Desktop.
teaching woodcat how to javascript
> var test = obj.a - obj.c;
undefined
> typeof test;
'number'
> isNaN(test);
true
> 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