Great job getting to the end of this lesson. Let’s review the content we learned:
- Conditional expressions control the flow of execution in a program.
ifexpression executes a block of code when the value of its condition is
elseexpression executes code when none of the previous expressions have a
- Comparison operators like
<=are used to compare two values to determine a
==operator checks if two values are equivalent while the
!=operator checks if two values are not equivalent.
- The logical AND operator (
truewhen two Boolean expressions being compared are both
- The logical OR operator (
truewhen at least one Boolean expression being compared is
- The logical NOT operator (
!) negates the value of a Boolean expression.
ifexpressions are used to add more conditions to a traditional
- A nested conditional is a conditional that appears inside of another conditional.
whenexpression evaluates the value of a variable or expression in order to dictate the flow of a program.
- The range operator
..creates a consecutive succession of values.
Use the space in Review.kt to practice the content learned in this lesson.
When you’re ready to move on, click Up Next.