Birmingham | 26-ITP-JAN | Merve Reis | Sprint 1 | Module Structuring and Testing Data#1091
Birmingham | 26-ITP-JAN | Merve Reis | Sprint 1 | Module Structuring and Testing Data#1091mervereis wants to merge 5 commits intoCodeYourFuture:mainfrom
Conversation
cjyuan
left a comment
There was a problem hiding this comment.
I noticed some inconsistency in the formatting of the code.
Consider install prettier VSCode extension and enable formatting on save/paste on VSCode as recommended in
https://github.com/CodeYourFuture/Module-Structuring-and-Testing-Data/blob/main/readme.md
cjyuan
left a comment
There was a problem hiding this comment.
Thanks for responding all comments in a clear manner.
Changes look good.
|
|
||
| //Breakdown | ||
| // Math.random() generates a random decimal number between 0 (inclusive) and 1 (exclusive). | ||
| // Math.random() generates a random decimal number in the interval (0, 1). |
| // 10.const pence = paddedPenceNumberString .substring(paddedPenceNumberString.length - 2); | ||
| // Gets the amount of pence by making a substring that starts at the paddedPenceNumberString length -2 to get the last 2 characters |
There was a problem hiding this comment.
Optional challenge:
Could we expect this program to work as intended for any valid penceString if we deleted .padEnd(2, "0") from the code?
In other words, do we really need .padEnd(2, "0") in this script?
There was a problem hiding this comment.
I'll test it in this way, thanks for this challenge. @cjyuan
|
You forgot to add "Needs Review" label. |
Learners, PR Template
Self checklist
Changelist
I answered the questions, done the changes.