DEV Community

Discussion on: A neat little trick with JavaScript's indexOf()

Collapse
 
jarrodconnolly profile image
Jarrod Connolly

That is a great little trick.

It is actually mentioned in the MDN documentation for Bitwise NOT

developer.mozilla.org/en-US/docs/W...

I agree that includes is more readable, but it still must be polyfilled in various situations.