Skip to content

Instantly share code, notes, and snippets.

@nixsticks
Created January 20, 2014 20:57
Show Gist options
  • Select an option

  • Save nixsticks/8528988 to your computer and use it in GitHub Desktop.

Select an option

Save nixsticks/8528988 to your computer and use it in GitHub Desktop.
1. 5
2. number
3. true
4. Infinity
5. NaN
6. false
7. number
8. true
9. 8
10. The variable first_name is declared. Javascript hoists the variable and instantiates it. Then the variable is initialized to "cindy"
11. undefined
12. false
13. "some person"
14. "Bart Simpson"
15. true; they are equal and of the same type
16. string
17. "3bob"
18. Math.round(4.87);
19. 3; Javascript infers that 2 needs to be and can be an integer and converts it.
20. NaN; "bob" has no numerical value so it cannot be multiplied
21. var x;
var y;
22. var hobby = "programming";
23. true
24. typeof("brogrammer");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment