The midterm will be closed note, book, friend, and computer. Test questions can be short answer, multiple choice, fill in the blank, true/false, and matching. Expect to write code on the test.
Practice Midterms
Note: On these tests there's a "pretend" function called show()
that works just like console.log()
Variables
- Declaring and instantiating variables
- Variable identifiers
- Reserved words
Numbers
- Understand the different ways to write number literals
- parseInt/parseFloat
- Know the difference between a float and an integer
- NaN, what is it, how to test for it, how does it happen
- Basic math operations
- Order of operations
- Using the Math object
Strings
- Escaping special characters
- Concatenation
Booleans
- Creating booleans by comparing values (<, <=, >, >=, ===, !===, etc.)
- Logical operations (&&, ||, !)
Truthiness and Falsiness
- Know what is considered falsey (everything else is truthy)
- Know why this matters
undefined/null
Typeof operator
- What does it do
- What does it return
Conditional statements
- If, else, else if
For/While loops
- When and how to use them
- What the three parts of a for loop are/when they run
- break/continue statements
Functions
- Declaring functions
- Functino parameters
- How to invoke a function
- Return statements
- You will be asked to write some functions that take in parameters and log something
Objects
- Creating objects
- Accessing a value in an object
- Setting a property of an object to a value
- Objects in objects
Graphs / Trees
- Root
- Leaf
- Parent/Child/Sibling
DOM
- The document object
- document.getElementById()
- Traversal (don't memorize the property names, but be able to recognize what they do)
DOM Events
- I won't ask you to write an event handler, but know how it works.
- Know what the preventDefault() method is used for