Follow

Follow

JavaScript Comparison and Relational Operators, WEBDEV Course by Nakul Goel Day-3

Nakul Goel's photo
Nakul Goel
ยทNov 23, 2022ยท

1 min read

JavaScript Comparison and Relational Operators, WEBDEV Course by Nakul Goel Day-3
Play this article

This is the third lecture of the WEBDEV Course by Nakul Goel, today we will be learning what are Comparison and Relational Operators in JavaScript.

The detailed video lecture is below:-

Before moving ahead

Important channels to Follow and subscribe to:-

Youtube:- youtube.com/channel/UCS_0LK2cA_y4Lfl6tUfdQgw

GitHub:- github.com/01NakulGoel

Lets Start

today we will be learning about two more types of operators in JavaScript and they are very easy and most important for a beginner.

RELATIONAL OPERATORS

image.png

Input=Number, Boolean, string

Output= Boolean

Types:-

1)< less than

2)> Greater than

3)<= less than equal to

4)>= Greater than equal to

Examples

2<10 //true

3<2 //false

10>2 //true

2>6 //false

2>=2 //true

2>=1 //false

3<=4 //true

100<=85 //false

Comparison Operators

input=number string and boolean

output = boolean

image.png

Types :-

1) == (only check value)

2) != (only check values)

3) === (strictly equal will check datatype also)

4) !== (strictly not equal will check datatype also)

image.png

Assignment

Q1 check if a 10 is equal to string 10 using all comparison operators.

Q2 what is the difference between double equal and strictly equal?

if you guys are learning from this course do comment and subscribe to the youtube channel and be regular.

ย 
Share this