dimanche 4 septembre 2016

elementary If else statement not working in javascript

I am totally new to javaScript and cannot understand why this elementary if else statement won't work. And before you mark down yes I have looked and can't find a simple answer to this simple question. Many thanks.

$(document).ready(function (){

var try = 0;

if (try == 0){

    alert("yes");

} else {

    alert("no");

}

});

Aucun commentaire:

Enregistrer un commentaire