Advertisement
Guest User

Untitled

a guest
Dec 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var n = 0
  2.  
  3.  
  4. while (n < 3) {
  5. password = prompt("Enter your password please")
  6. if (password == "123XY") {
  7.   alert("Password correct");
  8.   end
  9.  } else {
  10.    alert("Try again please");
  11.    n = n + 1;
  12.    }
  13.     if (n === 3) {
  14.   alert ("Incorrect password")
  15.   }
  16.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement