Skip to content

AlepilDev00/Credit-Card-Checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Credit-Card-Checker

Context: The company that you work for suspects that credit card distributors have been mailing out cards that have invalid numbers.

Table Of Contents

Overview

These functions were created to practice Javascript ES6 (functions, arrays manipulation, loops) learned in Codeacademy Full-Stack Engineer career path. The project is called "Challenge Project: Credit Card Checker".

Project Goals

In this project, you have the role of a clerk who checks if credit cards are valid. Every other clerk currently checks using pencil and paper, but you’ll be optimizing the verification process using your knowledge of functions and loops to handle multiple credit cards at a time.

  • The purpose of validateCred() is to return true when an array contains digits of a valid credit card number and false when it is invalid. This function should NOT mutate the values of the original array.
  • The role of findInvalidCards() is to check through the nested array for which numbers are invalid, and return another nested array of invalid cards.
  • idInvalidCardCompanies() should return an array of companies that have mailed out cards with invalid numbers. This array should NOT contain duplicates

Project Extensions

  1. Use different credit card numbers from a credit card number generator and validator site and test if your functions work for all types of credit cards.
  2. To make it easier to test credit card numbers, create a function that accepts a string and converts it into an array of numbers like the initially provided arrays.
  3. Create a function that will convert invalid numbers into valid numbers.

My version

Click here for my version!

Feel free to comment and give me advice to correct my mistakes and continue to improve. Thanks a lot in advance.

Sources

About

Codeacademy Challenge Project: Credit Card Checker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published