# ee.Number.and

Returns 1 if and only if both values are non-zero.

<br />

| Usage | Returns |
|---|---|
| `Number.and(right)` | Number |

| Argument | Type | Details |
|---|---|---|
| this: `left` | Number | The left-hand value. |
| `right` | Number | The right-hand value. |

## Examples

### Code Editor (JavaScript)

```javascript
print('Both 5 and 10 are not 0?', ee.Number(5).and(ee.Number(10)));  // 1
print('Both 5 and 0 are not 0?', ee.Number(5).and(ee.Number(0)));  // 0
```
Python setup

See the [Python Environment](https://developers.google.com/earth-engine/guides/python_install) page for information on the Python API and using
`geemap` for interactive development.

```python
import ee
import geemap.core as geemap
```

### Colab (Python)

```python
# 1
display('Both 5 and 10 are not 0?', ee.Number(5).And(ee.Number(10)))
# 0
display('Both 5 and 0 are not 0?', ee.Number(5).And(ee.Number(0)))
```