A while loop repeats as long as its condition is true. Code inside the loop must eventually change the value used by that condition.
let lives = 2;
while (lives > 0) {
console.log("Lives:", lives);
lives -= 1;
}Read the battery loop and predict the value of battery after it finishes. Replace the empty prediction while keeping the loop and Actual: line unchanged.
Check the condition again after each update.