To continue on from yesterday's credit card validation we also need a way to send over what type of card the user has entered. Rather than asking the user for the type of card we handle this automagically. Write a function to determine what type of credit card (amex, visa, etc) the user has entered.
Note: part of the challenging is figuring out the formula to how this is done.
Comments:
Anonymous - 10 years, 5 months ago
I extended my solution for yesterday's problem
where the main' is the main function of yesterday (but this time it takes only 1 number (full credit card number))
i tested it with my credit card and it worked... maybe there are some typos, but these are the rules i found on the net
reply permalink
bumbleguppy - 10 years, 5 months ago
javascript
reply permalink