The if Statement
Learn about if-else expressions to implement conditional control over the execution of a chunk of code.
Conditional statements in various languages
Most conditional statements, like the if
condition or the while
loop, look the same in Kotlin, Java, C++, JavaScript, and most other modern languages. For instance, the if
statement is indistinguishable in all these languages:
Get hands-on with 1400+ tech skills courses.