Share your repls and programming experiences

← Back to all posts
Javascript - (a==1 && a==2 && a==3) returns true?
Babbel (65)
This code shows how (a==1 && a==2 && a==3) can return true.

Babbel (65)

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

timmy_i_chen (1180)

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

Babbel (65)

@timmy_i_chen oh yeah, js is very weird ^^

LiamChurchill (3)

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

Babbel (65)

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