Skip to content

Conversation

SuWebOnes
Copy link

@SuWebOnes SuWebOnes commented Jul 7, 2025

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with REGION | COHORT_NAME | FIRST_NAME LAST_NAME | PROJ_NAME
  • I have tested my changes
  • My changes follow the style guide-
  • My changes meet the requirements of this task

Changelist

Briefly explain my PR.

Function Parameter and Return Handling
String Manipulation and Formatting
Time Conversion Logic
Testing and Debugging

Questions

Ask any questions you have for your reviewer.

SuWebOnes added 14 commits June 24, 2025 19:07
…m number generation in sprint -1 of 4-random.js
…reassignment in percentage change calculation
and describe the purpose  in sprint -1 of 3-to-pounds.js
@SuWebOnes SuWebOnes added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 7, 2025
@SuWebOnes SuWebOnes changed the title Coursework/sprint 1 London | May-2025 | Surafel Workneh | Coursework/sprint 1 Jul 7, 2025
@SuWebOnes SuWebOnes changed the title London | May-2025 | Surafel Workneh | Coursework/sprint 1 London | ITP-May-2025 | Surafel Workneh | Coursework/sprint 1 Jul 7, 2025
@SuWebOnes SuWebOnes changed the title London | ITP-May-2025 | Surafel Workneh | Coursework/sprint 1 London | ITP-May-2025 | Surafel Workneh | Structuring and testing data | Coursework/sprint 1 Jul 12, 2025
@cjyuan cjyuan added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 17, 2025
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkboxes in the PR descriptions are not in proper markdown syntax. Can you fix their markdown syntax? (I fixed one of them for you so that you can follow the example).

// 1. const penceString = "399p": initialize a string variable with the value "399p"
//2. Removes the trailing "p" from the string: and result will be 399
//3. Ensures the number has at least 3 digits by padding from the left with zeros: like 000
//4. Extracts the pound portion: "3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we expect this program to work as intended for any valid penceString if we deleted .padEnd(2, "0") (line 16) from the code?
In other words, do we really need .padEnd(2, "0") in this script?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it can work without '.padEnd(2, "0") (line 16) from the code? ' and I tested with different digits and it works

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have to delete .padEnd(2, "0"). It's a "code reading" practice.
More importantly, do you know why the script can still works correctly without .padEnd(2, "0")?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why the script can still works correctly without .padEnd(2, "0")?

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 17, 2025
@SuWebOnes
Copy link
Author

CJ would you mind if you check revisions please?

@SuWebOnes SuWebOnes added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 21, 2025
What is the return value of `prompt`?
Shows input dialog
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the value returned by prompt()?
The function returns different values depending on whether the user clicks the OK button or the Cancel button.

// 1. const penceString = "399p": initialize a string variable with the value "399p"
//2. Removes the trailing "p" from the string: and result will be 399
//3. Ensures the number has at least 3 digits by padding from the left with zeros: like 000
//4. Extracts the pound portion: "3"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why the script can still works correctly without .padEnd(2, "0")?

@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 21, 2025
@SuWebOnes
Copy link
Author

SuWebOnes commented Jul 21, 2025

Do you know why the script can still works correctly without .padEnd(2, "0")?
My Answer: padStart(3, "0") ensures that the conversion from pence to pounds so it worked even without .padEnd(2, "0")

@cjyuan
Copy link
Contributor

cjyuan commented Jul 21, 2025

Your answer to this question What is the return value of prompt? is not correct, but since it is an optional stretch exercise, I will mark this PR as complete first.

Also, it is helpful to change the label whenever your responses/changes are ready to be reviewed.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Jul 21, 2025
Copy link

Your PR's title isn't in the expected format.

Please check its title is in the correct format, and update it.

Reason: Sprint part (Structuring and testing data) doesn't match expected format (example: 'Sprint 2', without quotes)

@SuWebOnes SuWebOnes changed the title London | ITP-May-2025 | Surafel Workneh | Structuring and testing data | Coursework/sprint 1 London | ITP-May-2025 | Surafel Workneh | Structuring and testing data | Coursework | sprint 1 Aug 14, 2025
Copy link

Your PR couldn't be matched to an assignment in this module.

Please check its title is in the correct format, and that you only have one PR per assignment.

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

@SuWebOnes SuWebOnes changed the title London | ITP-May-2025 | Surafel Workneh | Structuring and testing data | Coursework | sprint 1 London | ITP-May-2025 | Surafel Workneh | Structuring and testing data | Coursework/sprint 1 Aug 14, 2025
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Structuring and testing data) doesn't match expected format (example: 'Sprint 2', without quotes)

@SuWebOnes SuWebOnes changed the title London | ITP-May-2025 | Surafel Workneh | Structuring and testing data | Coursework/sprint 1 LONDON | ITP-MAY-25 | SURAFEL WORKNEH | Coursework/sprint 1 Aug 14, 2025
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Wrong number of parts separated by |s

@SuWebOnes SuWebOnes changed the title LONDON | ITP-MAY-25 | SURAFEL WORKNEH | Coursework/sprint 1 LONDON | ITP-MAY-25 | SURAFEL WORKNEH | Coursework/sprint 1 Aug 14, 2025
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Wrong number of parts separated by |s

@SuWebOnes SuWebOnes changed the title LONDON | ITP-MAY-25 | SURAFEL WORKNEH | Coursework/sprint 1 LONDON | ITP-MAY-25 | SURAFEL WORKNEH | Module-Structuring-and-Testing-Data | Coursework/sprint 1 Aug 14, 2025
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Module-Structuring-and-Testing-Data) doesn't match expected format (example: 'Sprint 2', without quotes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complete Volunteer to add when work is complete and all review comments have been addressed. 🏕 Priority Mandatory This work is expected
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants