You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Minor change to make the code more readable. Array.includes is available in Node 6+ and can be used to replace the less-readable [].indexOf !== -1 or [].indexOf > -1.
In general, Array.includes is a drop in replacement but there are some slight differences in edge cases (most notably when searching for undefined).
Minor change to make the code more readable.
Array.includes
is available in Node 6+ and can be used to replace the less-readable[].indexOf !== -1
or[].indexOf > -1
.In general,
Array.includes
is a drop in replacement but there are some slight differences in edge cases (most notably when searching forundefined
).https://dev.to/adroitcoder/includes-vs-indexof-in-javascript
The text was updated successfully, but these errors were encountered: