Skip to Content
API Referencelif (logical if-else)

lif (logical if-else)

lif(cond: Array<Boolean>, a: Array<Number>|Array<Boolean>|Number|Boolean, b: Array<Number>|Array<Boolean>|Number|Boolean) -> Array<Number>|Array<Boolean>

Takes in an array of booleans and two arrays of values, and returns an array of values from array a where the conditional array is true, and from array b where the conditional array is false.