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 7764876 commit b84a082Copy full SHA for b84a082
Sprint-1/2-mandatory-errors/3.js
@@ -1,5 +1,5 @@
1
-const cardNumber = '4533787178994213';
2
-const last4Digits = cardNumber.slice(-4);
+const cardNumber = 4533787178994213;
+const last4Digits = String(cardNumber).slice(-4);
3
4
// A number was not able to be sliced, whereas a string can be sliced
5
// So, the error is that cardNumber should be a string, not a number
0 commit comments