Alt solution to the Except exercise in arrays section

function except(inputArray, exceptionArray){
  for(let element of exceptionArray){
    if (!inputArray.includes(element)) {
      console.log(`element ${element} not found`);
    }
    while (inputArray.includes(element)) {
      const index = inputArray.indexOf(element);
      inputArray.splice(index, 1)
    }
    
  }
}

fully functional alternative to mosh’s solution which iterated through the input array and removed element if included in exclude array. my solution is only longer b/c i return an error if exclude element is not found in input array