#javascript
#string
#substring
Usually I would expect a String.contains() method, but there doesn't seem to be one.
What is a reasonable way to check for this?
String.prototype.includes: https://developer.mozilla.org/en-US/d...
is not supported by Internet Explorer: https://caniuse.com/#closures polyfill: https://github.com/zloirock/core-js/b...
String.prototype.indexOf: https://developer.mozilla.org/en-US/d...