1//includes
2const fruits = ["apple", "mango", "banana", "kiwi"]
3return fruits.includes("mango") ? true : false; //returns true if element is in the array
4
5//find Index
6let matchIndex = fruits.findIndex((fruit)=>{return fruit == "mango"});
7matchIndex > -1 ? fruits[matchIndex] : null;
8//other than -1 means the element is in the array.