NOTE :1) Whenever we have more then on condition that condition use "when" its a enhance version of switch condition
fun main(){
val userType = "admin"
when(userType){
"admin"->{
println("You'r admin")
}
"editor"->{
println("You'r editor")
}
"author"->{
println("You'r author")
}
else->{
println("You'r Other")
}
}
}
Output: You'r admin