Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Find speacific object from an array in javascript

const friendsList = ["Abir", "Lalkhan", "Lion", "Shamol", "Kabir", "Shabir"];
if (friendsList.indexOf("Lion") != -1) {
    console.log("Lion Exists");
}
//Output: Lion Exists
 
PREVIOUS NEXT
Tagged: #Find #speacific #object #array #javascript
ADD COMMENT
Topic
Name
4+8 =