Filter by Tags

How to check whether a string contains a substring in JavaScript?



0 0

In javascript what are the ways in which I can check if a string contains a substring or not

Open E-School
Posted on : Fri, Jan 19, 2018
Views : 86

Ask Question

If you want to ask question you must LogIn or SignUp
Login SignUp

Answers (1)


In javascript there are more than 1 ways to check if a string contains a substring or not. The commonly used methods are indexof, search and includes. The indexof and search methods give the position of the substring in the given string whereas the includes method give a true results if the substring is present in the given string.

This tutorial explains this concepts with code examples 

Ravinder Singh
Fri, Jan 19, 2018

Edit Answer

This answer will permanently deleted. Do you really want to delete this Answer ?
To Add your Answer Please
LogIn | SignUp

Quick Links



Total Followers
Study Group Created
Study Group Joined
Following Teacher
Following Organization
Blog Articles Added
Questions Asked
Questions Answered
Jobs Posted
Total Members in Group
Questions asked by members
Tasks added in this Group

Please wait..


Login to Open ESchool OR Create your account    Login   SignUp