Learn JavaScript LOGICAL OPERATORS in 5 minutes ❗

preview_player
Показать описание
// logical operators = used to combine or manipulate Boolean values
// (true or false)

// AND = &&
// OR = ||
// NOT = !
Рекомендации по теме
Комментарии
Автор

// logical operators = used to combine or manipulate boolean values
// (true or false)

// AND = &&
// OR = ||
// NOT = !

// EXAMPLE 1
const temp = -100;

if(temp > 0 && temp <= 30){
console.log("The weather is GOOD");
}
else{
console.log("The weather is BAD");
}

// EXAMPLE 2
const temp = -250;

if(temp <= 0 || temp > 30){
console.log("The weather is BAD");
}
else{
console.log("The weather is GOOD");
}

// EXAMPLE 3
const isSunny = true;

if(!isSunny){
console.log("It is CLOUDY");
}
else{
console.log("It is SUNNY");
}

BroCodez
Автор

<*_> This is my seal. I have watched the entire video, understood it, and I can explain it in my own words, thus I have gained knowledge. This is my seal. <_*>

piotrmazgaj
Автор

Why do JavaScript developers prefer to work in the dark? Because they don't like "light" mode.

And i made the fith comment and noone can change that :O

Doggy_Styles_Coding