Advertisement
Viktor_Profa

Viktor Viktorovich - 20.06.2022- Ліфт Empire State

Jun 20th, 2022
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. https://shpp.gitbook.io/zero/tutorials/if-else/empire-state-building-lift
  2.  
  3.  
  4. let floor = prompt("Введіть поверх")
  5.  
  6. if (floor < 1  || floor > 102 ){
  7.     console.log("Невірний поверх")
  8. }
  9.  
  10. else if (39 >= floor && floor >= 24){
  11.     let password = prompt("Введіть пароль")
  12.      if (password == 1337){
  13.          console.log("OK")
  14.         }
  15.     else {
  16.          console.log("Невірний пароль")
  17.         }
  18.    
  19. }
  20.  
  21. else console.log ("Ok")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement