Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Intent to stop using 'null' in my JS code. Parent comment
For instance, if I'm fetching some data I usually want to initialize the data variable as null for a couple of reasons.
1) null is not truthy, empty arrays and objects are
2) It shows that the variable is supposed to be filled, unlike undefined
There are no comments on this comment yet.
For instance, if I'm fetching some data I usually want to initialize the data variable as null for a couple of reasons.
1) null is not truthy, empty arrays and objects are
2) It shows that the variable is supposed to be filled, unlike undefined