Search results

  1. A

    JavaScript Nested if

    Thank you so much! I have started to learn js from one book, and there for now is only basic staff, but yes, thank you, ill wrap my code like that in the future learning.
  2. A

    JavaScript Nested if

    Now I see everything is alright. Maybe I did understand something wrong. I thought the message "name not correct" will appear immediately after I wrote incorrectly the name, but its not. My mistake
  3. A

    JavaScript Nested if

    Hello! Please tell me someone what s wrong is with this code: var n = "Alice"; var l = "Field"; var name = prompt("Enter your name"); var lastName = prompt("Enter your last name"); if (name === n) { if (lastName === l) { alert("d"); } else { alert("try again")...
  4. A

    JavaScript What is wrong in this code?

    var name = prompt("How is your name?"); if (name = "Alesya" ) { alert("Good day " + name); } else { alert(name + "not correct"); }