Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 1.18 KB

README.md

File metadata and controls

41 lines (33 loc) · 1.18 KB

The credit card checker

A Codecademy javascript challenge, based on Luhn algorithm.

Table of contents

Project goals

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!

Technology

Project is created with:

  • ES6 Javascript

Launch

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

Source

This project was created by Codecademy for the Back-End engineer path.