Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check string in array of string in js

const names = ["Mario", "Anna", "Jacob"];

console.log(names.includes("Jade")) // Output: False
// It Checks If (Names) Contain's ("Jade") Or Not


console.log(names.includes("Anna")) // Output: True
// It Checks If (Names) Contain's ("Anna") Or Not
 
PREVIOUS NEXT
Tagged: #check #string #array #string #js
ADD COMMENT
Topic
Name
3+2 =