Way to go! We just learned a lot of control flow concepts:
else statements make binary decisions and execute separate code based on a condition.
- We can add extra conditions with to
else statements with
else if conditions.
switch statements make complicated
else statements easier to read, however they achieve the same result as
- Comparison operators, like
>= can compare two variables. After they compare, they always return either
- Logical Operators, like
!, can compare two variables to see if a certain condition exists:
&& checks if both sides are
|| checks if either side is
!== checks if both sides are not equal.
! changes a variable that is
false, and vice versa.
In the next lesson, we'll learn about functions, and how to write blocks of code that are reusable.