If Expression

Run Settings
LanguageKotlin
Language Version
Run Command
fun main(args : Array<String>){ ifElseOnVariabel() } fun ifElseGayaKu(){ val openHours = 7 val now = 20 if(now > openHours){ println("Office already open") } else{ println("Office is closed") } } fun ifElseGayaDicoding(){ val openHours = 7 val now = 20 val office : String if(now > openHours){ office = "Office already open" } else{ office = "Office is closed" } print(office) } fun ifElseOnVariabel(){ val openHours = 7 val now = 20 val office : String office = if (now > openHours){ "Office already open" } else{ "Office is closed" } println(office) }
Editor Settings
Theme
Key bindings
Full width
Lines