-
-
Notifications
You must be signed in to change notification settings - Fork 196
LONDON | ITP-MAY-25 | SURAFEL WORKNEH | Module-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
Conversation
…gnment sprint -1 of 1-count.js
…m number generation in sprint -1 of 4-random.js
…'let' in sprint -1 of 1.js
…licing in sprint -1 of 3.js
…ons in sprint -1 of 4.js
…reassignment in percentage change calculation
…sprint -1 of 2-time-format.js
and describe the purpose in sprint -1 of 3-to-pounds.js
… sprint -1 of chrome.md
There was a problem hiding this 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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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")
?
There was a problem hiding this comment.
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")
?
CJ would you mind if you check revisions please? |
What is the return value of `prompt`? | ||
Shows input dialog |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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")
?
Do you know why the script can still works correctly without .padEnd(2, "0")? |
Your answer to this question Also, it is helpful to change the label whenever your responses/changes are ready to be reviewed. |
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) |
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). |
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) |
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 |
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 |
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) |
Learners, PR Template
Self checklist
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.