The code jumps on clouds. It loops through the cloud array, looking for a cloud that has a value of 0 in its second position. If found, it increases the value of i by 2, and continues looping. Finally, it increments the jumps variable.
function jumpingOnClouds(c) {
let jumps = 0;
let i = 0;
while (i < c.length - 1) {
if (c[i + 2] === 0) {
i += 2;
} else {
i++;
}
jumps++;
}
return jumps;
}