In this JavaScript tutorial for beginners, I’ll show you the two logical operators we can use with our control flow statements (such as if statements and loops). The two operators are the AND operator ( && ) and the OR operator ( || ) .
The AND logical operator can be used when you need two or more conditions to be met, and the OR logical operator can be used when you only need ONE of two or more conditions to be met.
As always, any questions, fire ahead :).
SUBSCRIBE TO CHANNEL – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg?sub_confirmation=1
========== JavaScript for Beginners Playlist ==========
========== CSS for Beginners Playlist ==========
========== HTML for Beginners Playlist ==========
========== The Net Ninja ============
For more front-end development tutorials & to black-belt your coding skills, head over to – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg or http://thenetninja.co.uk
========== Social Links ==========
Twitter – @TheNetNinja – https://twitter.com/thenetninjauk
Original source
9 responses to “JavaScript Tutorial For Beginners #15 – Logical Operators”
Well explained, thank you. TT
Thanks!…I was looking for someone like you to have continuous lessons for javascript !
can you please explain the bitwise
var first = 123;
var second = false;
var third = 456;
var fourth = "abc";
var fifth = true;
alert(first & second); // 0
alert(first & third); // 72
alert(first & fourth); // 0
alert(first & fifth); // 1
alert(first && second); // false
alert(first && third); // 456
alert(first && fourth); // abc
alert(first && fifth); // true
Good video for a tricky set of operators, Clear and to the point.
Amazing video dude, keep it up!
I don't have words to express my gratitute. I'm learning a lot with you.
@TheNetNinja what software app do you use to program.
At the beginning there are logical operators listed. !=== does not exist, should be !==
Unless I'm mistaken.
Thank you for all the lessons (css,javascript… ,they are great ,exact ,extremely practical and useful! JavaScript is a difficult topic but your explanation makes it a breeze !!!