-
-
Notifications
You must be signed in to change notification settings - Fork 241
Manchester| 25-ITP-Sep | Fithi Teklom| Sprint 2 | Coursework #869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Manchester| 25-ITP-Sep | Fithi Teklom| Sprint 2 | Coursework #869
Conversation
…m/Module-Structuring-and-Testing-Data into acoursework/sprint-2
WeiTsungCheng
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's mostly correct, but some errors could be reconsidered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great for fulfilling the requirement, but if the file path doesn't end with .txt but instead is /Users/mitch/cyf/Module-JS1/week-1/interpret/file, will const ext return a blank value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No const ext won't return a blank value. It will incorrectly return the entire filename.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, so it can be changed to return a blank value. This is because no filename extension was provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the two times reversed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ow my bad yes they are.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove .padEnd(2, "0")
Will it affect the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing .padEnd(2, "0") won't break the logic may change the output formatting in certain cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- but may change the output formatting in certain cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the important thing is that variables don't start with number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- but may change the output formatting in certain cases.
Could you give an example that might have an impact?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, removing .padEnd(2, "0") will not change the output for valid inputs, because paddedPenceNumberString is already guaranteed to be at least 3 characters long from .padStart(3, "0").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only Test One passed the test, indicating that the function formatAs12HourClock(time) needs to be changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have adjusted it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I didn't notice your correct version was in the commented-out area. Your new version does indeed pass the test.
Self checklist