This is a codecademy project with a real world application. The challenge was to use the Luhn algorithm to determine if credit card numbers are valid.
- The arrays with the card numbs are the only things that were complete.
- The function validateCred was created by me to iterate through any CC array using the Luhn method.
- The function invalidCC iterates through the batch array to return all invalid cards
- The function idInvalidCardCompanies iterates through the invalidCC array to return the issuer of the invalid card
- I have added an HTML file that allows users to type in a 15 or 16 digit credit card number to be validated.
- The submit.onclick function grabs the data from the text box and pushes the array to the validateCred function.
- More about the Luhn algorithm: Luhn Algorithm
- The project on Codecademy CC_Validator