Skip to content

Instantly share code, notes, and snippets.

@tessafallon
Last active January 3, 2016 22:29
Show Gist options
  • Save tessafallon/8529028 to your computer and use it in GitHub Desktop.
Save tessafallon/8529028 to your computer and use it in GitHub Desktop.
JS exercises
My Score: 20/25
1. 5
2. number
3. true
4. 0 WRONG: returns infinity
5. NaN or undefined?
6. true WRONG: false
7. NaN WRONG: has a number type
8. true
9. 8
10. var says it's declaring a variable with the name "first_name" whose value is the string "cindy"
11. undefined
12. false
13. "someperson" WRONG: "some person"
14. "Bart Simpson"
15. 4
16. true--they are the same type with the same value
17. string
18. 3bob
19. Math.round(4.87)
20. 6 / "2" => 3 because of the math operation, JS converts the string 2 as a number
21. null -- you can't do 3 "bob" times WRONG: NaN
22. var x; var y;
23. var hobby = "programming"
24. true
25. typeof(brogrammer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment