hw05_13.html 477 B

1234567891011121314151617181920
  1. <head>
  2. <h1>Login and password</h1>
  3. </head>
  4. <body>
  5. <script>
  6. let rightLogin = "admin";
  7. let rigthtPass = "qwerty";
  8. let login = prompt("Enter login");
  9. let valid = login === rightLogin;
  10. if (valid) {
  11. let pass = prompt("Enter password");
  12. valid = pass === rigthtPass;
  13. }
  14. if (valid)
  15. alert("Congrats!!");
  16. else
  17. alert("wrong credentials!!! SUKA");
  18. </script>
  19. </body>