vendredi 23 octobre 2020

If statement ignores number value

Apologies for being so inept!

let country = "UK";
let language = "English";
let population = 60;
let isIsland = false;

if (language === "English", population < 50, isIsland === false) {
console.log(`You should live in ${country} :)`);
} else {
console.log(`${country} does not meet your criteria`);
}

Here whatever i make the variable of population to be it seems to be ignored by the If statement and im not sure why!

Aucun commentaire:

Enregistrer un commentaire