Find **GCD** (https://en.wikipedia.org/wiki/Greatest_common_divisor) of x and y

Make sure 1. **z is smaller than x or y** 2. **z could divided by GCD of x and y**

```
function canMeasureWater(x, y, z) {
for (var xx = x, yy = y; xx && yy && (xx %= yy) && (yy %= xx); );
return z <= Math.max(x, y) && z % (xx + yy) === 0;
}
```