Manchester | 26-ITP-Jan | Mehroz Munir | Sprint 1 | Coursework#999
Manchester | 26-ITP-Jan | Mehroz Munir | Sprint 1 | Coursework#999MehrozMunir wants to merge 4 commits intoCodeYourFuture:mainfrom
Conversation
Sprint-1/2-mandatory-errors/3.js
Outdated
| //After running the code, I have realized that the code is not working because cardNumber is a number and the slice is a method in String class | ||
| //so, in order to make it work, we need to change cardNumber to String before calling the slice method | ||
|
|
||
| const last4Digits = (cardNumber + "").slice(-4); |
There was a problem hiding this comment.
This works, but other people might not be able to understand. So always use the String() function to convert to string.
There was a problem hiding this comment.
Thank you for highlighint this issue. I have fixed it by using the String class instead of concatenation. I have pushed my changes. Please review the changes. Thanks.
There was a problem hiding this comment.
Cool. Some heads up, please update the label back to need review when you make a new push, after a review.
There was a problem hiding this comment.
Yeah I did that, but the git bot is not letting me as there is some issue if by mistake I made any changes in other sprints for this commit. Though in the commit it is showing me the changes made to only sprint 1 files. I am figuring out how to resolve this issue.
Once I be able to do that, I will add the needs review label and would let you know.
Thanks.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Hi @JaypeeLan |
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
6349e37 to
3d20367
Compare
|
Hi @JaypeeLan Thanks |
Learners, PR Template
Self checklist
Changelist
I have completed all the exercises in Sprint-1 inluding key-exercises, mandatory errors, mandatory interpret abd stretch explore
Questions
I have one question regarding the code already provided in 3-to-pounds.js file in mandatory-interpret section.
I have added my note on line no. 36 of this file.
My questions is regarding the below piece of code in that file:
.padEnd(2, "0")As I think, we don't need the padding there and it does not serve any purpose.