vendredi 4 décembre 2020

I don't understand why the if statement doesn't become false [closed]

Can someone please help me? Why doesn't it execute: This is the second line? What did I do wrong?

let x = 11;
let number = x => 0 && x >= 10;
if (number) {
    document.write('This is the first line.');
} else {
    document.write('This is the second line.');
}

Aucun commentaire:

Enregistrer un commentaire