Question: e.g. please add html, css Credit Card Validation You're starting your own credit card business. You've come up with a new way to validate credit

 e.g. please add html, css Credit Card Validation You're starting your e.g.
own credit card business. You've come up with a new way to
please add html, css

Credit Card Validation You're starting your own credit card business. You've come up with a new way to validate credit cards with a simple function called validateCreditCard that returns true or false Here are the rules for a valid number: Number must be 16 digits, all of them must be numbers You must have at least two different digits represented (all of the digits cannot be the same) The final digit must be even The sum of all the digits must be greater than 16 . The following credit card numbers are valid 9999-9999-8888-0000 6666-6666-6666-1666 The following credit card numbers are invalid: a923-3211-9c01-1112 invalid characters 4444-4444-4444-4444 only one type of number 1111-1111-1111-1110 sufn less than 16 6666-6666-6666-6661 odd final number In order to run the function, you'll need to load javascript on an HTML page. From there, you will open your developer console to call the function. Elements Console Sources Network IC)top > validateCreditCard 9999777788880000) Filter Default lovels , true Hint: Remove the dashed from the input string before checking if the input credit card number is valid Bonus: Return an object indicating whether the credit card is valid, and if not, what the error is t valid: false, number: a923-3211-9c01-1112, error: 'wronglength' Double Bonus: Make your credit card scheme even more advanced! What are the rules, and what are some numbers that pass or fail? Ideas: check the expiration date Please enter a credit card number and click VALIDATE Input Credit Card Number II VALIDATE Invalid credit card number - Last number must be an even numberl

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!