Skip to content

Latest commit

 

History

History

312-luhnCheck

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

luhnCheck

Interview question of the issue #312 of rendezvous with cassidoo.

The Question

Implement the Luhn algorithm to validate a credit card number. Bonus points if you can identify what brand of credit card the user inputted!

Example:

> luhnCheck(123456789)
> false

> luhnCheck(5555555555554444)
> true // Mastercard

Installing & Running

Just pnpm i to install all dependencies and then pnpm t to run the tests!