Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
gavinray
4y ago
0 comments
Share
JS has Array.some() for "contains"
0 comments
default
newest
oldest
filoeleven
4y ago
The caveat there is that you cannot call it without a null check on “u.name” first. contains(null, “whatever”) would just return false instead of throwing a runtime exception. Hence my edit: users.filter() has the same problem.
j
/
k
navigate · click thread line to collapse