let jumps = 0; let currentIndex =0; while(currentIndex<c.length-1){ if(c[currentIndex+2]==0){ jumps += 1 currentIndex+=2; } else if(c[currentIndex+1]==0){ jumps+=1 currentIndex+=1; } } return jumps