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, 'equal to 10', 'not 10')

Related functions:

Update your privacy settings