BY Simmi Kava16 Apr 2021 Edit
Comparison of Numbers

JavaScript: Comparison of 3 Numbers


Ever wondered why the below comparison of numbers gives the following output?

1 < 22 < 33

Output:

true

But,

33 > 22 > 1

Output:

false

Isn't this strange? Well, not really!

33 > 22  //true
true > 1 // 1 > 1 = false

So, how do we fix this? Relational Operator Greater than or equal operator (>=).

33 > 22 >= 1

Output:

true
BY Simmi Kava
LikeCommentSave
LikeCommentSaveShare
0
Categories
General
YantraJS
Developer Guides
Tutorials
Web Atoms Updates

POPULAR POSTS
17 Mar 2021
LATEST ACTIVITY
Simmi Kava
commented this post.
Simmi Kava
liked this post.
Show more
ARCHIVES
2025
2024
2023
2022
TAGS
javascript (56)
developer (25)
javascriptdeveloper (16)
Xamarin.Forms (16)
Html (14)
typescript (12)
webatoms (12)
xamarin (11)
coding (10)
web-atoms (10)
arrays (9)
android (8)
javascript-developer (8)
csharp (7)
dotnet (7)
css (6)
update (6)
dotnet-standard (5)
function (5)
iOS (5)
methods (4)




Web Atoms: JSX (TSX + TypeScript) for Xamarin.Forms, Hot Reload Your App in Production Environment

PlaygroundSamples Repository