Skip to content

London | ITP-May-2025 | Surafel Workneh | Structuring and testing data | Coursework/sprint 1 #646

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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

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 Participant to add when requesting review 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 Participant to add when requesting review 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 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 Participant to add when requesting review 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 Participant to add when requesting review label Jul 21, 2025
@SuWebOnes SuWebOnes added 🏕 Priority Mandatory This work is expected 🔑 Priority Key Do this first labels Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔑 Priority Key Do this first 🏕 Priority Mandatory This work is expected Reviewed Volunteer to add when completing a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants