Credit card checker

Hi.
I am getting “TypeError: cardInverted.reduce is not a function” when I run the function withe following final bit of code:

let sum = cardInverted.reduce((a, b) => a + b);
if (sum % 10 == 0) {
return true;
} else {
return false;
}
};

Can anyone advise why with an explanation?
Thanks in advance.

Could you please post your code? Ill have a look at it.