acoconut
02/08/2021, 2:58 PMAli Albaali
02/08/2021, 3:04 PMIf (value)
//... Some code (included in the if statement)
//... Some code (not included)
Other than that, there's no difference!Matteo Mirk
02/08/2021, 3:08 PM* ? * : *
)Vampire
02/08/2021, 3:10 PMif
always has ()
mkrussel
02/08/2021, 3:17 PMVampire
02/08/2021, 3:17 PMMatteo Mirk
02/08/2021, 3:44 PMVampire
02/08/2021, 3:45 PMelse
, yes. Without it should actually be statement I think. 🙂Matteo Mirk
02/08/2021, 3:49 PMacoconut
02/08/2021, 3:51 PMval max = if (a > b) (
a
) else (
b
)
vs
val max = if (a > b) {
a
} else {
b
}
Vampire
02/08/2021, 3:54 PMacoconut
02/08/2021, 4:05 PMMatteo Mirk
02/08/2021, 4:08 PMVampire
02/08/2021, 4:08 PMMatteo Mirk
02/08/2021, 4:09 PMacoconut
02/08/2021, 4:10 PMMatteo Mirk
02/08/2021, 4:15 PM