jeudi 17 janvier 2019

How to fix simple if statement script?

I'm learning how to code on Javascript and for some reason this simple if statement isn't triggering the alert when activated through HTML. Any one know what I'm doing wrong?

var a = 5
var b = 10

if ( a < b ) {
    alert("Yes, a is less than b");
}

if ( a == b ) {
alert("Yes, a is equal to b"};
}

Aucun commentaire:

Enregistrer un commentaire