You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// I thought the issue might be something to do with the number given (-4) but it's actually the fact that cardNumber.slice is not a function.
6
5
// Slice is not a function for numbers - it's for strings
7
-
// To solve this we can turn the card number into a string
6
+
// To solve this we can turn the card number into a string by using toString() - this converts the number to a string temporarily rather than changing the card number to a string itself.
0 commit comments