const exp = ['ok','no']; if(exp.includes(a)){ // TODO } Array.prototype.includes() - JavaScript | MDN
Array.prototype.includes() - JavaScript | MDN