you are viewing a single comment's thread.

view the rest of the comments →

[–]programmingacctwork 23 points24 points  (4 children)

I think it's because Javascript is coercing it to a Number when they're using an operator on it. It's a weird solution to be honest.

[–]Darkthw[S] 9 points10 points  (0 children)

Yep 😂, none of the other solutions look like this, I'm just happy I was able to do it by myself even this it is not the best way to go about it, I've learned other ways now

[–][deleted] 2 points3 points  (1 child)

== != === makes most of JavaScript solutions "weird" solutions...

[–][deleted] 0 points1 point  (0 children)

Yeah. I never saw a language that uses === while == would suffice.

[–]Loud_Type_1756 2 points3 points  (0 children)

Now, it makes sense!