Hacker News new | past | comments | ask | show | jobs | submit login
Serious question, why does lodash.isNull exist? (github.com/lodash)
1 point by user3939382 on April 11, 2023 | hide | past | favorite | 3 comments



Because 'null' in Javascript isn't intuitive https://www.destroyallsoftware.com/talks/wat


Exactly. This emphasized that '===' semantically means 'is'; '==' means 'equals'.


So that you can refer to it by name, and do things like `_.remove(myArray, _.isNull)` to get an array with no null values.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: