Use Conditional Logic with If Statements
Summary
- If statements are used to make decisions in code.
- The keyword if tells JavaScript to execute the code in the curly braces under certain conditions, defined in the parentheses.
- These conditions are known as Boolean conditions and they may only be
true
or false
.
Final Code