var fruits = ["Banana", "Orange", "Apple", "Mango"]; var n = fruits.includes("Mango");
var colors = ["red", "blue", "green"]; if(colors.indexOf("blue") !== -1){ //colors contains the string "blue" }else{ //colors does not contain the string "blue" }