land()

Performs a logical AND operation.

Returns `1` if both values are nonzero, otherwise returns `0`.

Syntax

land(value1, value2)

Parameters

Parameter Type Description
value1 Number The first numeric value to check.
value2 Number The second numeric value to check.

Return Value

Examples

land(1, 1);   // returns 1
land(1, 0);   // returns 0
land(0, 5);   // returns 0
land(3, -2);  // returns 1

See also

lnot
land
lor
lxor
lnand
lnor
lxnor