Forum Replies Created

  • Can you tell what steps would you follow using particular, because I just tried without getting to nothing .

  • Abdessalem Boukil

    June 10, 2016 at 9:50 pm in reply to: simple javascript question

    The condition b != "a" || b != "b" will always return true and it will always output “I am a ‘b'” .
    To fix it you only should change b != "a" || b != "b" to b != "a" && b != "b"


    var b = "b"

    if(b != "a" && b != "b"){
    alert("I am a 'b'")
    }else{ alert("I am not a 'b'");
    }

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy