Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on PHP 8.1.0. Parent comment
Because an array is an object which has a 'truthy' value '![]' evaluates as 'false'.
Simplifies to a statement similar to 'false == false'.
A little useless arcana for those interested.
Well, not so useless if your expecting '!someEmptyArray' to evaluate to 'true'. Use '!someEmptyArray.length' instead.
There are no comments on this comment yet.
Because an array is an object which has a 'truthy' value '![]' evaluates as 'false'.
Simplifies to a statement similar to 'false == false'.
A little useless arcana for those interested.
Well, not so useless if your expecting '!someEmptyArray' to evaluate to 'true'. Use '!someEmptyArray.length' instead.