O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

To check for undefined, just write:

if (myarray[i] == undefined) {
  ...
}

From

Cover of Head First JavaScript Programming

Note

how to check if some variable is "undefined"?