Filter by Tags

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

Votes

0

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
Comments

Ask Question

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

Answers (1)


0

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

http://openeschool.com/tutorial/3232/how-to-check-whether-a-string-contains-a-substring-using-javascript 

Ravinder Singh
Fri, Jan 19, 2018
Loading...
Comments

Edit Answer

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

Quick Links

E-Magazines

@

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..

Ok

Login to Open ESchool OR Create your account    Login   SignUp