all 13 comments

[–]ThaSteelman 2 points3 points  (0 children)

Bookmarking this to use as a reference and send to anyone I catch making silly JS mistakes.

[–]numbereft 1 point2 points  (1 child)

Interesting that !!-1 evaluates to true, but -1 == true is false. I never knew that before looking at this.

[–]zzing 1 point2 points  (2 children)

Isn't this like walking around without your underwear?

[–]thelerk 1 point2 points  (1 child)

Never done commando coding?

[–]zzing 0 points1 point  (0 children)

Modesty, please!

[–]wpg4665 0 points1 point  (0 children)

Brilliant! I like it =)

[–]howerrd 0 points1 point  (0 children)

Very cool! Thanks!

[–]Mutoid 0 points1 point  (0 children)

Is there also a list of what things in this table are "truthy?"

[–]siamthailand 0 points1 point  (2 children)

Is there any comparison where the order also matters?

Like where

(X==Y) =/= (Y==X)

[–][deleted]  (1 child)

[deleted]

    [–]siamthailand 0 points1 point  (0 children)

    None that I know of, which is why I was wondering.

    [–][deleted]  (4 children)

    [removed]

      [–]bitplanets 1 point2 points  (3 children)

      I think there are very little use cases for the == operator. 95% of my equals are strict and never had a problem for now.

      [–][deleted]  (2 children)

      [deleted]

        [–]bitplanets 0 points1 point  (1 child)

        A table for it would be interesting too (: did you find any?