When

Definition

function When(condition: Boolean, if_true: any, if_false: any) {
    return any
}

Input

  • condition : the boolean condition which is to be checked

  • if_true : the value to be returned when the condition is true

  • if_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