Live data from Hacker News

Return True to Win

alf.nu

51–60 of 123 posts

Re: Return True to Win

#51
post #49
post #31

Find the exact combination of browser/OS that does more than show "return true to win" on a white background to win.

> Find the exact combination of browser/OS that does more than show "return true to win" on a white background to win. I see: return true to win (Come back in a few minutes.) What do I win?

A moment in which to reflect.

Re: Return True to Win

#54
post #21

This table is quite useful to solve some problems: https://dorey.github.io/JavaScript-Equality-Table/

> Moral of the story: Always use 3 equals unless you have a good reason to use 2.

  NaN === Nan  // => false
  [] === []    // => false
  {} === {}    // => false
  [1] === [1]  // => false
  [0] === [0]  // => false
I guess i never see the gains in the triple vs double equal sign wars.

Re: Return True to Win

#55
post #21

This table is quite useful to solve some problems: https://dorey.github.io/JavaScript-Equality-Table/

> Moral of the story: Always use 3 equals unless you have a good reason to use 2. NaN === Nan // => false [] === [] // => false {} === {} // => false [1] === [1] // => false [0] === [0] // => false I guess i never see the gains in the triple vs double equal sign wars.

Do any of those return true if you use double equals? The distinction only really comes up when you have to different types on either side and then It will coerce one of the types to match the other.
Post reply on HN