Using JavaScript to validate credit card numbers
- this code demo uses Node.js
- ran via terminal through command
node main.js
- completed code for main functions:
- validateCred(
credNumArr
) - findInvalidCards(
credNumArrBatch
) - idInvalidCardCompanies(
invalidCredNumArrBatch
)
- validateCred(
- completed code for extended functions:
- convertToArr(
credNumStr
); - convertToValid(
invalidCredNumStr
);
- convertToArr(
- all functions tested and passed