var a = prompt("Загадка:зимой и летом одним цветом?"); if (a = "ель" || "Ель") { alert("правильно"); } else { alert("неправильно"); } 

    2 answers 2

    You have two mistakes

    1. You confused the comparison operator ( == ) and the assignment operator ( = )
    2. You are completely wrong using the operator LOGICAL OR ( || )

    Must be so

     var a = prompt("Загадка:зимой и летом одним цветом?"); if ((a == "ель") || (a == "Ель")) { alert("правильно"); } else { alert("неправильно"); } 

    • Thank!!!!!!!! - Verzilamv

    Assignment:

     a="ель" 

    Comparison:

     a == "ель" 
    • Thank you! I'm just learning) It would not be possible to throw off the correct code !! - Verzilamv