Advertisement
Guest User

Untitled

a guest
Jul 13th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1.  
  2. while (true) {
  3.  
  4. var username = prompt("Type what you want your username to be");
  5. var password = prompt("Type what you want your password to be");
  6. var userConfirm = confirm("Do you want your username to be: " + username);
  7. var passConfirm = confirm("Do you want your password to be: " + password);
  8.  
  9. if (passConfirm === true) {
  10.  
  11. break;
  12.  
  13. }
  14.  
  15. if (passConfirm === false) {
  16.  
  17. continue;
  18.  
  19. }
  20.  
  21. if (userConfirm === true) {
  22.  
  23. break;
  24.  
  25. }
  26.  
  27. if (userConfirm === false) {
  28.  
  29. continue;
  30.  
  31. }
  32. }
  33.  
  34. while (true) {
  35.  
  36. var userLogin = prompt("Username:");
  37. var passLogin = prompt("Password:");
  38.  
  39.  
  40. if (userLogin === username) {
  41. if (passLogin === password) {
  42. alert("Succesfully signed in :D");
  43. break;
  44. }else if (passLogin !== password) {
  45.  
  46. alert("Your password is incorrect");
  47. continue;
  48. }
  49.  
  50.  
  51. }else if (userLogin !== username){
  52.  
  53. alert("Your usernname is incorrect");
  54. continue;
  55.  
  56. }
  57.  
  58.  
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement