'코드'
if <조건식> {
<조건이 참일 떄 실행할 구문>
} else {
<조건이 거짓일 떄 실행할 구문>
}
moveForward()
if isOnClosedSwitch {
toggleSwitch()
} else if isOnGem {
collectGem()
}
moveForward()
if isOnClosedSwitch {
toggleSwitch()
} else if isOnGem {
collectGem()
}
'Playgrounds'플레이그라운드'' 카테고리의 다른 글
Playgrounds '플레이그라운드' 9. (0) | 2024.05.17 |
---|---|
Playgrounds '플레이그라운드' 8. (0) | 2024.05.16 |
Playgrounds '플레이그라운드' 6. (0) | 2024.05.15 |
Playgrounds '플레이그라운드' 5. (0) | 2024.05.15 |
Playgrounds '플레이그라운드' 4. (0) | 2024.05.14 |