JSFiddle - React, Tailwind, and code Playground

JavaScript

var arrayResults = [5,1,,5,6,,10];

for (var i = 0, l = arrayResults.length; i < l; i++) {
    if (typeof(arrayResults[i])=='undefined') {
         console.log('Element ' + i + ' is undefined.');
    };
};