Operators and Loops
What is an expression in JavaScript
- “Valid unit of code that resolves to a value”
- 2 Types: expressions that have side effects (assigning values), expressions that evaluate
Why would we use a loop in our code?
- To have your computer do an action repeatedly
When does a for loop stop executing?
- When the condition it was given evaluates to false
How many times will a while loop execute?
- As long as the condition it was given is still true.
My own notes
- LOGICAL OR –>
||
- LOGICAL AND –>
&&
- LOGICAL NOT –>
! “opposite” !true = false