ee.Number.or

Returns 1 iff either input value is non-zero.

UsageReturns
Number.or(right)Number
ArgumentTypeDetails
this: leftNumber

The left-hand value.

rightNumber

The right-hand value.

Examples

Code Editor (JavaScript)

print('Either 0 or 5 non-zero?', ee.Number(0).or(ee.Number(5)));  // 1
print('Either 0 or 0 non-zero?', ee.Number(0).or(ee.Number(0)));  // 0