Conditional Statements
Conditional statements allow programs to make decisions.
If Statement
Example:
let x = 10
if (x > 5) {
print("x is greater than 5")
}
Example:
let age = 18
if (age >= 18) {
print("Adult")
}
Conditional statements allow programs to make decisions.
Example:
let x = 10
if (x > 5) {
print("x is greater than 5")
}
Example:
let age = 18
if (age >= 18) {
print("Adult")
}
From here you can search these documents. Enter your search terms below.
| Keys | Action |
|---|---|
| ? | Open this help |
| n | Next page |
| p | Previous page |
| s | Search |