😘Logical Operators in JavaScript #youtubeshort #javascript #shortvideo #programming #shorts

preview_player
Показать описание
✔Logical Operators in JavaScript #youtubeshort #javascript #shortvideo #programming #shorts

Operator Description Example
&& and (x {less than} 10 && y {greater then} 1) is true
|| or (x == 5 || y == 5) is false
! not !(x == y) is true

|| (OR)
The “OR” operator is represented with two vertical line symbols:
In classical programming, the logical OR is meant to manipulate boolean values only. If any of its arguments
are true, it returns true, otherwise it returns false.
The OR || operator does the following:-
1. Evaluates operands from left to right.
2. For each operand, converts it to boolean. If the result is true, stops and returns the original value of that
operand.
3. If all operands have been evaluated (i.e. all were false), returns the last operand.

&& (AND)
The AND operator is represented with two ampersands &&.
In classical programming, AND returns true if both operands are truthy and false
The AND && operator does the following:-
1. Evaluates operands from left to right.
2. For each operand, converts it to a boolean. If the result is false, stops and returns the original value of
that operand.
3. If all operands have been evaluated (i.e. all were truthy), returns the last operand.

! (NOT)
The boolean NOT operator is represented with an exclamation sign !.
The operator accepts a single argument and does the following:-
1. Converts the operand to boolean type: true/false.
2. Returns the inverse value.

🤞🤞Thank you for watching guys🥰🥰

For more:-
3 JavaScript interview questions✔
Find any color code without any extensions
How to add emoji inside any code👇👇
4 important VS code shortcut
🤬money heist professor whatsapp status🤬
Comments tags HTML, CSS and JavaScript
100k subscriber in 5sec Hack
MERN Stack Developer | About MERN Development
Рекомендации по теме
welcome to shbcf.ru