Cape Town | 26-ITP-Sep | Quentin Gwele | Sprint 3 | coursework: sprint 3 - #1592
Open
lwandogwele52-ui wants to merge 10 commits into
Open
lwandogwele52-ui wants to merge 10 commits into
lwandogwele52-ui wants to merge 10 commits into
Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
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.
lwandogwele52-ui
force-pushed
the
sprint-3
branch
from
September 25, 2026 18:01
a39d35b to
42903a4
Compare
Contributor
|
Could you reformat the PR description in Markdown to make it look like this: Self checklist
Task codeCYF-1053 ChangelistFinished all required fields in the coursework. |
cjyuan
reviewed
Sep 29, 2026
Author
|
I've addressed the feedback, please take another look.
…On Tue, 29 Sept 2026, 15:55 CJ Yuan, ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In Sprint-3/2-mandatory-debug/2.js
<#1592 (comment)>
:
> -// Finally, correct the code to fix the problem
-// =============> write your new code here
No new implementation was included in this script.
------------------------------
In Sprint-3/3-mandatory-implement/1-bmi.js
<#1592 (comment)>
:
> + const bmi = weight / (height * height);
+ return bmi.toFixed(1);
What *type* of value do you expect your function to return? A number or a
string?
Does your function return the *type* of value you expect?
Different types of values may appear identical in the console output, but
they are represented and treated differently in the program. For example,
console.log(123); // Output 123
console.log("123"); // Output 123
// Treated differently in the program
let sum1 = 123 + 100; // Evaluate to 223 -- a number
let sum 2 = "123" + 100; // Evaluate to "123100" -- a string.
------------------------------
In Sprint-3/3-mandatory-implement/3-to-pounds.js
<#1592 (comment)>
:
> +function toPounds(kg) {
+ return kg * 2.20462;
+}
The function is supposed to turn the code in
Sprint-2/3-mandatory-interpret/3-to-pounds.js into a function.
------------------------------
In Sprint-3/5-stretch-extend/format-time.js
<#1592 (comment)>
:
> @@ -4,12 +4,20 @@
function formatAs12HourClock(time) {
const hours = Number(time.slice(0, 2));
- if (hours > 12) {
- return `${hours - 12}:00 pm`;
+ const minutes = time.slice(3);
Note: The .slice() method supports negative indices, which count positions
from the end of the string.
For example, str.slice(-3) returns the substring containing last three
characters from str.
------------------------------
In Sprint-3/5-stretch-extend/format-time.js
<#1592 (comment)>
:
> + } else if (hours > 12) {
+ return `${hours - 12}:${minutes} pm`;
+ } else {
+ return `${hours}:${minutes} am`;
If "01:00" is converted to "01:00 am", it is probably reasonable for the
caller to expect "13:00" to be converted to "01:00 pm" (instead of "1:00
pm").
When the returned values are not formatted consistently, it may result in
unintended side-effect. For examples,
1. When the strings are displayed, "01:00 pm" and "1:00 pm" would not
align as nicely.
01:00 am
1:00 pm
12:00 am
01:00 pm
2. When the formatted strings are compared in the program, "1:00 pm" <
"11:00 pm" and 01:00 am" < "11:00 am" produce different results.
Consistency is important so the caller can be certain what to expect from
a function.
—
Reply to this email directly, view it on GitHub
<#1592?email_source=notifications&email_token=CFBVDQRHBNRG6YRZ4E4UN5L5RO5ODA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKMZVGMZTINBTHEY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#pullrequestreview-5353344391>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/CFBVDQVGBHPXWNFCWQS5YNL5RO5ODAVCNFSNUABFKJSXA33TNF2G64TZHM4DSOJQGI2DGMRUHNEXG43VMU5TKNJYGYYDQOBYHE32C5QC>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/CFBVDQS75ZQC76RIFCZT2IT5RO5ODA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKMZVGMZTINBTHEY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/CFBVDQUCKM3JAPCFNIFMJ3D5RO5ODA5CNFSNUABKM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UKJSXM2LFO4XTKMZVGMZTINBTHEY2M4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you authored the thread.Message ID:
<CodeYourFuture/Module-JavaScript-Fundamentals/pull/1592/review/5353344391
@github.com>
|
Contributor
|
There are a few comments that I'm not sure have been addressed. Could you use AI to explore best practices for responding to inline comments in a PR and apply what you learn to this PR? Also, the checkboxes and the headings in the PR description are still not yet formatted properly in Markdown. |
Contributor
|
All good now. Well done! |
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 checklist
Task code
CYF-1053
Changelist
Finished all required fields in the coursework.