Cape Town |ITP-MAY-26|Enice Mutanda|Sprint 2| Coursework #1400
Open
Enice-Codes wants to merge 8 commits into
Open
Cape Town |ITP-MAY-26|Enice Mutanda|Sprint 2| Coursework #1400Enice-Codes wants to merge 8 commits into
Enice-Codes wants to merge 8 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
5 similar comments
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.
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.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
cjyuan
reviewed
Jul 2, 2026
| // Use the MDN string documentation to help you find a solution | ||
| // This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase | ||
|
|
||
| function touppersneakers (input){ |
Contributor
There was a problem hiding this comment.
Could you look up the naming conventions in JavaScript? In particular,
- Variable and function names
- Class and Types names
- Named constants
Then, update the function name according to those conventions.
Comment on lines
18
to
22
| if (hours > 12) { | ||
| return `${hours - 12}:00 pm`; | ||
| return `${hours - 12}:${minutes} pm`; | ||
| } | ||
|
|
||
| return `${time} am`; |
Contributor
There was a problem hiding this comment.
The code looks correct.
Could you update the code so that the return values of formatAs12HourClock("01:23") and formatAs12HourClock("13:23") are formatted consistently?
cjyuan
reviewed
Jul 4, 2026
Comment on lines
-13
to
+28
| const currentOutput = formatAs12HourClock("08:00"); | ||
| const targetOutput = "08:00 am"; | ||
| // Existing tests | ||
| console.assert( | ||
| formatAs12HourClock("8:00") === "8:00 am", | ||
| "8:00 should be 8:00 am" | ||
| ); |
Contributor
There was a problem hiding this comment.
The original tests suggest the argument is a string in the form "hh:mm" (2-digit hour and 2-digit minute).
Without changing the argument, to make the return value formatted consistently we could conditionally pad a 0 to the hour so that the return value is in the form "hh:mm am" or "hh:mm pm".
Contributor
|
Changes look good. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Self Check
Changelist
Answered questions to all excerises
completed code
checked code on node
Used Dev tools as per an excercise