Source Code: (back to article)
var array = [11, 20, 8, 6, 17];

var el = 6; //Element to be searched


for(var i=0; i<array.length; i++) {
if(el === array[i]) {
console.log('Element Found');
}
}