Js determines whether there are placeholder elements in the array

var arry = [1br 2];
arry [2] / / undefined
is there a way like indexOf to return the index value of the placeholder?

Apr.27,2021

var arry = [1,2,,4,5];
for(var i=0;i<arry.length;iPP){
    if(arry[i]){
        console.log("success");
    }else {
        console.log(i);
    }
}

the place where success is printed can also be left empty


arr.findIndex (I = > i=undefined)
only returns the index, found for the first time. If there are more than one, you have to traverse

yourself.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b428cd-2c604.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b428cd-2c604.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?