includes v. indexOf

Noticed some Javascript was breaking only in IE. Must have forgotten: Instead of string.includes use string.indexOf(‘x’)>-1.

Or better yet add the polyfill noted on the MDN String.prototype.includes() page!

This entry was posted in dev, Uncategorized. Bookmark the permalink. Comments are closed, but you can leave a trackback: Trackback URL.