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 4d1e5f1 commit 8436a8aCopy full SHA for 8436a8a
1 file changed
Sprint-1/2-mandatory-errors/3.js
@@ -8,7 +8,5 @@ const cardNumber = 4533787178994213;
8
// Consider: Why does it give this error? Is this what I predicted? If not, what's different?
9
// Then try updating the expression last4Digits is assigned to, in order to get the correct value
10
11
-// [ChunYanWong] The slice method extract substring starting with the first parameter position
12
-// There is no -4 starting position and hence it will not work
13
14
-const last4Digits = cardNumber.toString().slice(cardNumber.toString().length - 4)
+const last4Digits = cardNumber.toString().slice(-4)
0 commit comments