Javascript filter method not working on nested array

I’m working on a Codecademy JavaScript project. The prompt is to create a function to verify a given credit card number which I’ve done here:

const validateCred = (arr) => {
  const newArr = arr.reverse();
  let sum = newArr.reduce(
    (acc, val, i) =>
      i % 2 == 0 ? acc + val : acc + ((val *= 2) > 9 ? val - 9 : val),
    0
  );
  return sum % 10 === 0;
};

The next step is to create another function which takes a nested array as its parameter and will return a new array of only the invalid cards. I’ve tried using the .filter method to do this, but it returns undefined. I’ve tried two different methods.

const findInvalidCards = arr => {
  arr.filter(card => {
    return validateCred(card) === false;
  });
} 

and

function isInvalid(card) {
  return validateCred(card) === false;
}

const findInvalidCards = arr => {
  arr.filter(isInvalid);
}

Both return undefined. If I make findInvalidCards an object (I think that’s what I’m doing at least, still learning) specific to the nested array, or “batch” in this case, and not a function, it will work, like in this example:

const findInvalidCards = 
  batch.filter(card => {
    return validateCred(card) === false;
  });

But when I try to make it a function that could work on any array, it gives me undefined. Why does the filter method not work in the function, but will work directly on as part of an object? Thank you.