We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e9765f commit ced4d8cCopy full SHA for ced4d8c
Sprint-1/2-mandatory-errors/3.js
@@ -1,5 +1,13 @@
1
+//const cardNumber = 4533787178994213;
2
+//const last4Digits = cardNumber.slice(-4);
3
+
4
const cardNumber = 4533787178994213;
-const last4Digits = cardNumber.slice(-4);
5
+const last4Digits = String(cardNumber).slice(-4);
6
7
+//My prediction was the long card number isn't a string so js will assume it's a variable
8
+//Error given: cardNumber.slice is not a function
9
+//added String function
10
11
12
// The last4Digits variable should store the last 4 digits of cardNumber
13
// However, the code isn't working
0 commit comments