if()
if(predicate, then_expr, else_expr)
returns then_expr
if predicate
is true
, and else_expr
otherwise.
Returns
If
predicate
is exactlytrue
, we returnthen_expr
.Otherwise, we return
else_expr
.
Examples
Last updated
Was this helpful?