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 d7dbde9 commit 718a5a4Copy full SHA for 718a5a4
Sprint-1/2-mandatory-errors/3.js
@@ -11,5 +11,10 @@
11
const cardNumber=4533787178994213;
12
13
//then conver to number
14
-const last4Digits = Number(cardNumber.toString().slice(-4));
+const last4Digits = cardNumber.toString().slice(-4);
15
console.log(last4Digits);
16
+
17
+// or i can put quotes on cardNumber which will be string
18
+const cardNumber ="4533787178994213"
19
+const last4Digits = cardNumber.slice(-4);
20
+console.log(last4Digits)
0 commit comments