If you are not familiar with astronomy, a black hole is a collapsed star whose gravitational field is so strong that it pulls matter and even light into it. Similarly, once the test on the above while loop succeeded, execution is sucked into the loop, never to return. Something relevant to the loop test must change on each pass through the loop for there to be any hope of ever exiting the loop. In the case above, the variable roll must be reassigned inside the loop so that each pass compares a new roll of the dice. Whenever you write a while loop, always check to make sure that the loop test is being affected by code inside the loop before you attempt to execute it.
Infinite loops are to be avoided at all costs.
In most cases, there is no way to gracefully terminate an infinite loop in the JavaScript interpreter. As such, you should pay careful attention whenever you write a while loop to try to avoid these mishaps. Saving code frequently is a good idea as well. Generally speaking, you should use a for loop whenever unconditional repetition is needed, and a while loop whenever conditional repetition is needed. In reality, however, the difference between while loops and for loops is purely syntactic.