Skip to content

Commit 07ec3e9

Browse files
authored
Update 3.js
1 parent 4a6cad1 commit 07ec3e9

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • Sprint-1/2-mandatory-errors

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
const cardNumber = 4533787178994213;
2-
const last4Digits = cardNumber.slice(-4);
1+
const cardNumber = "4533787178994213";
2+
const last4Digits = cardNumber.slice(cardNumber.length-4,cardNumber.length);
3+
console.log(last4Digits)
34

45
// The last4Digits variable should store the last 4 digits of cardNumber
56
// However, the code isn't working

0 commit comments

Comments
 (0)