A Smarter Way to Learn JS – Notes


Uncategorized

Updated Mar 21st, 2022

asmarterwaytolearn.com/js/index-of-exercises.html

Some of the syntax is outdated but the exercises are fun

  1. Alerts
  2. Variables for Strings
  3. Variables for Numbers
  4. Variable Names Legal and Illegal
  5. Math Expressions: familiar operators
  6. Math Expressions: unfamiliar operators
  7. Math Expressions: eliminating ambiguity
  8. Concatenating text strings
  9. Prompts
  10. if statements
  11. Comparison operators
  12. if…else and else if statements
  13. Testing sets of conditions
  14. if statements nested
  15. Arrays
  16. Arrays: adding and removing elements
  17. Arrays: removing, inserting, and extracting elements
  18. for loops
  19. for loops: flags, Booleans, array length, and loopus interruptus
  20. for loops nested
  21. Changing case
  22. Strings: measuring length and extracting parts
  23. Strings: finding segments
  24. Strings: finding a character at a location
  25. Strings: replacing characters
  26. Rounding numbers
  27. Generating random numbers
  28. Converting strings to integers and decimals
  29. Converting strings to numbers, numbers to strings
  30. Controlling the length of decimals
  31. Getting the current date and time
  32. Extracting parts of the date and time
  33. Specifying a date and time
  34. Changing elements of a date and time
  35. Functions
  36. Functions: passing them data
  37. Functions: passing data back from them
  38. Functions: local vs. global variables
  39. switch statements: how to start them
  40. switch statements: how to complete them
  41. while loops
  42. do…while loops
  43. Placing scripts
  44. Commenting
  45. Events: link
  46. Events: button
  47. Events: mouse
  48. Events: fields
  49. Reading field values
  50. Setting field values
  51. Reading and setting paragraph text
  52. Manipulating images and text
  53. Swapping images
  54. Swapping images and setting classes
  55. Setting styles
  56. Target all elements by tag name
  57. Target some elements by tag name
  58. The DOM
  59. The DOM: Parents and children
  60. The DOM: Finding children
  61. The DOM: Junk artifacts and nodeType
  62. The DOM: More ways to target elements
  63. The DOM: Getting a target’s name
  64. The DOM: Counting elements
  65. The DOM: Attributes
  66. The DOM: Attribute names and values
  67. The DOM: Adding nodes
  68. The DOM: Inserting nodes
  69. Objects
  70. Objects: Properties
  71. Objects: Methods
  72. Objects: Constructors
  73. Objects: Constructors for methods
  74. Objects: Prototypes
  75. Objects: Checking for properties and methods
  76. Browser control: Getting and setting the URL
  77. Browser control: Getting and setting the URL another way
  78. Browser control: Forward and reverse
  79. Browser control: Filling the window with content
  80. Browser control: Controlling the window’s size and location
  81. Browser control: Testing for popup blockers
  82. Form validation: text fields
  83. Form validation: drop-downs
  84. Form validation: radio buttons
  85. Form validation: ZIP codes
  86. Form validation: email
  87. Exceptions: try and catch
  88. Exceptions: throw
  89. Handle events within JavaScript