.includes()
// IE8 : custom declaration of indexOf()
if(!Array.indexOf){
Array.prototype.indexOf = function(obj){
for(var i=0; i<this.length; i++){
if(this[i]==obj){
return i;
}
}
return -1;
}
};
var aList = ['A', 'B', 'C', 'D', 'E'];
// if (aList.includes('D'))
if (aList.indexOf('D') > -1) {
alert('D!');
}