ee.Number.not

Returns 0 if the input is non-zero, and 1 otherwise.
UsageReturns
Number.not()Number
ArgumentTypeDetails
this: inputNumberThe input value.

Examples

Code Editor (JavaScript)

print('Value is not 0', ee.Number(5).not());  // 0
print('Value is 0', ee.Number(0).not());  // 1