if

function, since version 1.0.0
categories: conditionals

if(cond, t, f)

returns t if cond is true, otherwise returns f

parameters

return type:

any, the same type of parameter t and f

example

if(product.quantity < 10, 'less than 10', 'more than 10')

Related functions:

Update your privacy settings