Answers for "use ternary operator in kotlin"

7

Kotlin ternary

if (a) b else c

println(if (true) "yes" else "no") // "yes"
println(if (false) "yes" else "no") // "no"
Posted by: Guest on May-10-2020

Browse Popular Code Answers by Language