includes function from javascript is the answer. here is the example
console.log(['jane', 'joker', 'marce'].includes('joker')); //returns yes // includes javascript function returns boolen yes or no if it finds the value in array