Js loop two arrays match some key equal to operate

is there any other way to find an instance in the for nesting I use

Mar.23,2021

for (var i=0;i<array1.length;iPP){
    var j = array2.indexOf(array1[i]);
    if (j > -1){
        console.log(i);
        console.log(j);
        break;
    }
}

or use the findIndex method in ES6

var i = array1.findIndex(function(value,index,arr){
    return (array2.indexOf(value) > -1);
})

var j = array2.indexOf(array1[i]);
console.log(i,j)
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-1b32afa-2be3e.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-1b32afa-2be3e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?