Way to go! Here are some of the major concepts for conditionals:
ifstatement checks a condition and will execute a task if that condition evaluates to
if...elsestatements make binary decisions and execute different code blocks based on a provided condition.
!==can compare two values.
&&, or “and”, checks if both provided expressions are truthy.
||, or “or”, checks if either provided expression is truthy.
!, switches the truthiness and falsiness of a value.
switchstatement can be used to simplify the process of writing multiple
else ifstatements. The
breakkeyword stops the remaining
cases from being checked and executed in a
In main.js, practice the skills you learned in this lesson.