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 ba1300d commit c109c56Copy full SHA for c109c56
Sprint-1/2-mandatory-errors/3.js
@@ -7,7 +7,6 @@
7
// .slice() called on a number, and Numbers don’t have string methods like .slice().it will throw an error
8
// console.log(last4Digits) => TypeError: cardNumber.slice is not a function at Object.
9
const cardNumber = 4533787178994213;;
10
-// const last4Digits = cardNumber.toString;
11
const numToStr = cardNumber.toString()
12
const last4Digits = numToStr.slice(-4)
13
-console.log(last4Digits) //===>4213
+// console.log(last4Digits) ===>4213
0 commit comments