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 2d7234f commit 62528e6Copy full SHA for 62528e6
Sprint-1/2-mandatory-errors/3.js
@@ -9,9 +9,7 @@
9
//run this Code, my prediction is right. In order to fix it, first cast to string first:
10
11
const cardNumber=4533787178994213;
12
-const last4Digits = cardNumber.toString.slice(-4);
13
14
//then conver to number
15
-const last4Digits = Number(cardNumber.toString.slice(-4));
16
-console log(last4Digits);
17
-
+const last4Digits = Number(cardNumber.toString().slice(-4));
+console.log(last4Digits);
0 commit comments