if()
Returns
Examples
# evaluates to "red" if the color is red, "green" otherwise
if(color_is_red, "red", "green")Last updated
Was this helpful?
if(predicate, then_expr, else_expr) returns then_expr if predicate is true, and else_expr otherwise.
If predicate is exactly true , we return then_expr .
Otherwise, we return else_expr.
# evaluates to "red" if the color is red, "green" otherwise
if(color_is_red, "red", "green")Last updated
Was this helpful?
Was this helpful?