var arr = [{x: 1}, {x: 2}, ,{x: 4},{x: 5}] for(var i = 0; i < arr.length; i++) { if(arr[i] === undefined) alert(); }