36. Javascript comparison operators and conditional operators – Full stack web development Course
21.8K views on YouTube
In this FullStackWebDevelopment tutorial series video, We will learn about #javascript #comparison #operators and if/else #conditional operators. These allow the code to make smart decisions. The several comparison operators used in javascript are (for eg x=7;)
A) == checks if two variables have equal value.
Example:
x==8 false
x==7 true
x==’7’ true
B) === Checks for equal value and equal type
Example:
x==8 false
x==7 true
x==’7’ false
C) != Checks for value Not equal
Example:
x!=8 true
D) !== Checks for Not equal value or not equal type
Example:
x!==’8’ true
x!==8 true
x!==7 false
E) (Left angle bracket) Checks for Value Greater than
Example:
x(Left angle bracket) 8 false
F) (Right angle bracket) Checks for Value Less than
Example:
x(Right angle bracket) 8 true
G) (Left angle bracket) = Checks for Value greater than or equal to
Example:
x(Left angle bracket) =8 false
H) (Right angle bracket)= Checks for Value Less than or equal to
Example:
x(Right angle bracket)=8 true
If-else statement:
The if/else statement executes a block of code if a specified condition is true. If the condition is false, another block of code can be executed.The if/else statement is a part of JavaScript’s “Conditional” Statements, which are used to perform different actions based on different conditions.
– if is used to specify a block of code to be executed, if a specified condition is true.
– else if is used to specify a new condition to test, if the first condition is false.
– else is used to specify a block of code to be executed, if the same condition is false and no other else if, if present is true.
—————————-
Week 1 : Day 6
Section 5 : Learning to Code With Javascript
Tutorial 36: Javascript comparison operators and conditional operators
—————————-
Do subscribe and hit Bell Icon
—————————-
Follow us in social media handles for opportunities and code related support.
Instagram: https://www.instagram.com/wb.web/
Facebook: https://www.facebook.com/wbweb/
Twitter: https://twitter.com/wbweb_in/
LinkedIn: https://www.linkedin.com/company/wbweb/
———————————————————-
Got a question on the topic? Please share it in the comment section below and our experts will answer it for you.
For more information, please write back to us at hi@wbweb.co.in or call us at IND: 7077568998
After completing the course, write to biswabijaya@wbweb.co.in for internship or freelancing opportunities.
For consultation or partnership related queries drop a mail to hi@wbweb.co.in.