A Codecademy javascript challenge, based on Luhn algorithm.
Context: The company that you work for suspects that credit card distributors have been mailing out cards that have invalid numbers. In this project, I have the role of a clerk who checks if credit cards are valid. Every other clerk currently checks using pencil and paper, but I’ll be optimizing the verification process using functions and loops to handle multiple credit cards at a time. Unlike the other clerks, I want to spend the rest of your time relaxing!
Project is created with:
- ES6 Javascript
First download the project.
To check is a card number is valid:
console.log(validateCred(cardNumber));
To check which credit cards are invalid:
console.log(findInvalidCards(batch));
To determine which companies own the invalid credit cards
console.log(idInvalidCardCompanies(batch));
To see the result, run node:
node main.js
This project was created by Codecademy for the Back-End engineer path.