In ECMAScript 6 you can use the Number.isNaN function:
var arr = [7, 1, "abc", undefined, NaN];
for (i=0; i < arr.length; i++){
// check if array value is false or NaN
if (arr[i] === false || Number.isNaN(arr[i])) {
console.log("NaN found at place " + i);
}
}
If you need to work in ECMAScript 5 then the problem with the isNaN function is that it is checking to see if the value is able to be coerced into a number. Instead you could use the odd property of the NaN value - it isn't equal to itself:
var arr = [7, 1, "abc", undefined, NaN];
for (i=0; i < arr.length; i++){
// check if array value is false or NaN
if (arr[i] === false || arr[i] != arr[i]) {
console.log("NaN found at place " + i);
}
}