Skip to content

Commit e05bbce

Browse files
committed
completed 4.js with comments
1 parent 818acf9 commit e05bbce

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

Sprint-1/2-mandatory-errors/3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
//*Answer
2222
const cardNumber = 4533787178994213;
2323
const last4Digits = cardNumber.toString().slice(-4);
24-
console.log(last4Digits);
24+
console.log(last4Digits);

Sprint-1/2-mandatory-errors/4.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1-
const 12HourClockTime = "20:53";
2-
const 24hourClockTime = "08:53";
1+
//const 12HourClockTime = "20:53";
2+
//const 24hourClockTime = "08:53";
3+
4+
//What's wrong with this code?
5+
//*Answer
6+
//The variable is not named in line with the Javascript naming convention.
7+
// When declaring a variable it must not start with a number, space or reserved word.
8+
// to fix this, we can rename them correctly.
9+
10+
const twelve_HourClockTime = "20:53";
11+
const twentyFour_HourClockTime = "08:53";

0 commit comments

Comments
 (0)