Skip to content

Commit f2cbb98

Browse files
debug2604debug2604
authored andcommitted
Wrote the TypeError below my prediction line 8. Prediction matches.
1 parent dc9d08d commit f2cbb98

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Sprint-2/2-mandatory-errors

‎Sprint-2/2-mandatory-errors/3.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// Then try updating the expression last4Digits is assigned to, in order to get the correct value
77
// Expectation about the error : cardNumber is assigned a number value, a .slice function does not work on number
88
// The constant last4Digits should be assigned to a String (cardNumber) to perform .slice function.
9-
// The code would result a TypeError.
9+
// The code would result a TypeError. It matches my prediction.
1010
const cardNumber = 4533787178994213;
1111
const last4Digits = String(cardNumber).slice(-4);
1212

0 commit comments

Comments
 (0)