One of the questions on my assignment was to switch a do while into a while loop. I am a little stuck I tried moving it around a butch different ways but my code still doesn't output correctly.
do {
userChoice = window.prompt("Press a to add a Robot Step to take\n, Press r to remove a Robot Step last Step to take\n, Press f to remove a Robot First Step to take\n, Press p to make the robot move the steps,");
userChoice = userChoice.toLowerCase();
switch(userChoice) {
case "a":
addStepsPerMovement(stepsPerMovement);
break;
case "r":
removeLastMovement(stepsPerMovement);
break;
case userChoice == "f":
removeFirstMovement(stepsPerMovement);
break;
case "p":
printByWhileLoop (stepsPerMovement);
break;
default:
document.write("Erroneous Choice\n");
break;
}
userContinue = window.prompt("Do you want to continue?, y or n");
userContinue = userContinue.toLowerCase();
} while (userContinue == "y")
