When
Definition
function When(condition: Boolean, if_true: any, if_false: any) {
return any
}Input
condition: the boolean condition which is to be checkedif_true: the value to be returned when the condition is trueif_false: the value to be returned when the condition is false
Returns any
This will return the statement which is true according to the given condition
Last updated