- function dieOnFirstJump() {
- var lives = 0;
- while (true) {
- lives += 1;
- if (lives % 100 === 0) {
- console.log("Life " + lives);
- }
- if (Math.floor(Math.random() * 100000) === 1) {
- console.log("It took you " + lives + " to die on the first jump");
- break;
- }
- }
- }
- dieOnFirstJump();