How to check if a string contains another string with JavaScript

1 · Josh Sherman · Oct. 26, 2018, midnight
Checking whether or not a string contains another string, or just a single character. It’s a been a pretty unavoidable sanity check in my programming career. It’s not quite a problem for the ages, but it comes up regularly and can be approached a few different ways. ES5 and prior......