How do I check if one string contains another substring?

Using JavaScript | taught by Steve Smith

Course description

JavaScript provides a few different ways to detect if one string contains another. This is a frequently asked question on, and several of the best solutions there are detailed in this short video solution.

Steve Smith
Steve Smith

Steve Smith (@ardalis) is an entrepreneur and software developer with a passion for building quality software as effectively as possible. He provides mentoring and training workshops for teams with the desire to improve. Steve has been recognized as a Microsoft MVP for over a dozen consecutive years, and is a frequent speaker at software developer conferences and events. He is one of the top contributors to the official documentation on ASP.NET Core and enjoys helpings others write maintainable, testable applications using C#, JavaScript, and .NET. Connect with Steve at

Course Curriculum

Hide Content