Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
5

Javascript - (a==1 && a==2 && a==3) returns true?

Babbel
Babbel

https://repl.it/@Babbel/JavascriptMagicalIf
This code shows how (a==1 && a==2 && a==3) can return true.

4 years ago
You are viewing a single comment. View All
1
1
Babbel
Babbel

@timmy_i_chen thanks, but i didn't find out this by myself. I saw it somewhere on the internet

4 years ago
2
timmy_i_chen
timmy_i_chen

@Babbel
reminds me a bit of this equality chart - JS is such a great but wonky language ;)

Cannot infer image mime type

4 years ago
1
Babbel
Babbel

@timmy_i_chen oh yeah, js is very weird ^^

4 years ago
1
LiamChurchill
LiamChurchill

@Babbel
Most likely off a Stack Overflow post with the title like "Can (a==1 && a==2 && a==3) be true?"

4 years ago
1
Babbel
Babbel

@LiamChurchill
I saw it in a YouTube video and the YouTuber found it on a website. But I can't remember the address anymore

4 years ago