The type of loop depends on where you need/want to test. The while loop tests at the top, so the loop body may or may not be entered depending on the test condition. The do while tests at the bottom and will enter the loop body at least once. The for loop can behave either way depending on how it's initialized.
With your code, maybe something like
-
var turn = prompt(...);
-
-
while(test conditions are false)
-
{
-
turn = prompt(...);
-
}
-
-
// manipulate turn's value here
-
Another thing is javascript treats LEFT, left, LEft, etc as different strings. To deal with that, you can use turn.toLowerCase() or turn.toUpperCase() in your test conditions.