Glasgow | 26-ITP-May | Sandani Kannangara | Sprint 2 |Coursework#1366
Glasgow | 26-ITP-May | Sandani Kannangara | Sprint 2 |Coursework#1366SandzSoft wants to merge 14 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
cjyuan
left a comment
There was a problem hiding this comment.
Code looks good. I just have a few suggestions.
| // =============> Write your prediction here | ||
| //---------------------------------------------------------------------------------------------------------- | ||
|
|
||
| const num = 103; |
There was a problem hiding this comment.
Note: Deleting the global num is optional. Within the function block, num is resolved to the parameter num.
If you are interested in the topic, you can looking up these two concepts, identifier scope and
identifier resolution, in the context of JavaScript programming. ChatGPT can give a good explanation.
| if (hoursInt === 12) | ||
| return `${timeParts[0]}:${timeParts[1].padStart(2, "0")} pm`; |
There was a problem hiding this comment.
Why not use mins?
Code is correct. If time permits, you should try to refactor the code (in the whole function) to keep it cleaner.
It's a good practice.
Note: The usual practice for an if statement with a single statement in its body is:
if (condition) statement;or
if (condition) {
statement; // Use braces when placing the statement on a separate line.
}
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.
|
The validation bot is rejecting this PR because Reverting ChangesOne way to revert changes to a file is via the First, locate a commit before the file was modified. It could be the first commit you made, assuming the branch started in a clean state. Next, record the first 7 characters of the commit SHA. Suppose the file is After the file is restored, make a commit and push the changes to GitHub. Ignore tracked file locallyIn future PR, to ignore a tracked file such as And if you ever need undo the operation in order to track it again, use: This is commonly used for local configuration files that differ per developer. |
Thank you for guiding me through GitHub. I’m still new to it, and your explanations have really helped me understand how fix it. |
|
Changes look good. Not everyone can use |
Self checklist
Changelist