Array operation problem

let arr1 = ["0", "aaa", "bbb", "123"];
let arr2 = ["ccc", "ddd", "eee", "fff"];
The

code is as above, and the requirements are as follows:
if a number appears in arr1, the corresponding subscript array in arr2 is deleted.

for example:

let arr1 = ["aaa", "bbb"];
let arr2 = ["ddd", "eee"];
May.07,2021

const getNewArray = (arr1, arr2) => {
  let total = 0;
  arr1.forEach((el, i) => {
    if(/\d/.test(el)) {
      arr2.splice(i - total, 1)
      totalPP;
    }
  })
  return arr2; 
}
Menu