Skip to content
This repository was archived by the owner on Jan 14, 2024. It is now read-only.

Commit 06d0bab

Browse files
committed
Convert to JS file
I don't see much value in getting the trainee to create the file
1 parent e3dce03 commit 06d0bab

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
## **PROJECT: Credit Card Validator**
1+
/*
2+
PROJECT: Credit Card Validator
23
34
In this project you'll write a script that validates whether or not a credit card number is valid.
45
@@ -11,26 +12,22 @@ Here are the rules for a valid number:
1112
1213
For example, the following credit card numbers are valid:
1314
14-
```markdown
15-
9999777788880000
16-
6666666666661666
17-
```
15+
- 9999777788880000
16+
- 6666666666661666
1817
1918
And the following credit card numbers are invalid:
2019
21-
```markdown
22-
a92332119c011112 (invalid characters)
23-
4444444444444444 (only one type of number)
24-
1111111111111110 (sum less than 16)
25-
6666666666666661 (odd final number)
26-
```
20+
- a92332119c011112 (invalid characters)
21+
- 4444444444444444 (only one type of number)
22+
- 1111111111111110 (sum less than 16)
23+
- 6666666666666661 (odd final number)
2724
2825
These are the requirements your project needs to fulfill:
2926
30-
- Make a JavaScript file with a name that describes its contents.
3127
- Create a function with a descriptive name which makes it clear what the function does. The function should take one argument, the credit card number to validate.
3228
- Write at least 2 comments that explain to others what a line of code is meant to do.
3329
- Return a boolean from the function to indicate whether the credit card number is valid.
34-
- Use `node` from the command line to test if your code works as expected.
30+
- Use `node extra/1-card-validator.js` from the command line to test if your code works as expected.
3531
3632
Good luck!
33+
*/

0 commit comments

Comments
 (0)