Does someone have a <52 char solution for the counter one ?
(x=0)=>()=>++x
Return True to Win
61–70 of 123 posts
Re: Return True to Win
#62Re: Return True to Win
#63Does anybody really know why JS's type system was designed the way it was? It seems so out of whack with what people want out of a language, dynamically typed or otherwise.
It wasn't; the language was implemented from scratch in ten days.
Re: Return True to Win
#64Find the exact combination of browser/OS that does more than show "return true to win" on a white background to win.
Re: Return True to Win
#65Re: Return True to Win
#66This 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.
The NaN example comes directly from IEEE754
The others are based on the fact that the two sides are not referring to the same object. C "equivalents" of your examples:
int x[0], y[0]; x == y; // false
typedef struct {} empty_t; empty_t *x, *y; x == y; // false
int x[] = { 1 }, y[] = { 1 }; x == y; // false
int x[] = { 0 }, y[] = { 0 }; x == y; // falseRe: Return True to Win
#67Earlier quoted context omitted.
It loads eventually
Does it? ReturnTrue:1 Fetch API cannot load https://bigger.alf.nu/db/true/H5VmsyVCBD62113H5Slu . No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin ' http://alf.nu' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Re: Return True to Win
#68Page had message that the Hacker News 'hug' was likely to affect performance.
Re: Return True to Win
#69Earlier quoted context omitted.
> 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.
"0" == 0 && "0" !== 0Re: Return True to Win
#70Does someone have a <52 char solution for the counter one ?
(x=0)=>()=>++x
(x=0)=>_=>++x
the underscore is another variable but a single variable does not require parenthesis. So instead of two chars for the two parens, you use a single char for a single letter variable. JS FTW ;)