Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

search partial string in array javascript

var arr = ['hello my name is harendra','hello my name is gyanendra']
result = arr.filter(element => element.includes("harendra"));
console.log(result)
 
PREVIOUS NEXT
Tagged: #search #partial #string #array #javascript
ADD COMMENT
Topic
Name
4+2 =