Manchester | 26-ITP-Sep | Mathew Shaibu | Sprint 2 | Course-work-2 - #1546
MattCarolus10 wants to merge 64 commits into
Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
You don't need to submit the files under the
Good try, and keep it up. |
|
Thank you very much |
| const dir = filePath.slice(0, lastSlashIndex); | ||
| console.log(`The dir part of ${filePath} is ${dir}`); | ||
|
|
||
| const ext = base.slice(4); |
There was a problem hiding this comment.
The file name does not necessary 4 characters long. It can be longer and shorter (e.g. considering /path/to/screenshot.png). Cutting out the first 4 characters does not necessary remain the file extension. Please fix it, thank you.
There was a problem hiding this comment.
Thank you for this review, I have checked and found out the right solution. Appreciate
| // num variable that carries the result of the expressions evaluated. | ||
| // (maximum - minimum) does basic math: 100 - 1 + 1 = 100 | ||
| // Math.floor() takes out all decimal and make them an integer. | ||
| // Math.random() gives random numbers between 0 and 100. | ||
| // + minimum add 1 at the end but randomise to the value between 0 and 100 No newline at end of file |
There was a problem hiding this comment.
Math.random()itself does not give a number between 0 to 100.+ minimumwould not randomise value.- The explanation require a bit more details and clarity.
- It would be better for your breakdown to following the same order of expression evaluation.
Please fix and elaborate you answer, thank you.
There was a problem hiding this comment.
Thank you, review acknowledged
| const HourClockTime1 = "8:53pm"; | ||
| const hourClockTime2 = "20:53"; | ||
| console.log(`${HourClockTime1}, ${hourClockTime2}`) |
There was a problem hiding this comment.
While this fixed the error, can you think of better variable names? Thank you.
There was a problem hiding this comment.
Variable names changed, thank you
|
|
||
| // e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression? | ||
|
|
||
| // Answer: ReplaceAll() function clears out all the commas in the strings, the number() converts the strings to numbers to help with calculation |
There was a problem hiding this comment.
JavaScript is case sensitive. It should be "The Number() converts ..."
There was a problem hiding this comment.
Thank. you, Error corrcted.
|
|
||
| // f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer | ||
|
|
||
| // Answer: It will work for integer values and will give us clear and clean result using this code. However, the result would not be clean as this using float values |
There was a problem hiding this comment.
One more situation that make this program won't work well even an integer value is provided. Can you think of it?
There was a problem hiding this comment.
I will check and make research to see
| // Also, line 3-6 used the function substring(0, penceString.lrength - 1) to cut out the "p" in the "penceString" variable. | ||
| // By starting count fron 0 (beginnning) of "399p". | ||
| // "Using penceString.lenght - 1" to check the length of the value in the variable penceString = "399p" (4), | ||
| // And deducting 1 from the value (4 - 1), because length - 1 subtract 1 from the character/value count 4. leaving the value at "399" |
There was a problem hiding this comment.
While the result of getting "399" is correct, the explanation seems not quite accurate to me.
- it is not counting, it should be indexing
- the reason for deducting 1 is due to how the second parameter of
substring()works
Please revise your answer. Thank you.
There was a problem hiding this comment.
My explanation is due to my level of understanding, I need to work on my terminologies usage going forward. Thank you
| // And deducting 1 from the value (4 - 1), because length - 1 subtract 1 from the character/value count 4. leaving the value at "399" | ||
|
|
||
| // Line 8 a variable "paddedPenceNumberString" was created and a function padStart(3, "0") | ||
| // was used to ensure the value of the variable remains at 3 and to be filled with "0" at the beginning if the value is less 3 |
There was a problem hiding this comment.
Your understanding might be correct but the presentation seems not quite right. What does the "value" in your explanation "the value of the variable remains at 3" mean? Can you revise the wording a bit please? Thank you.
p.s.: same issue with line 50-51 below, and please revise it as well.
There was a problem hiding this comment.
Thank you so much for all your reviews, I really appreciate them and I have taken notes of the corrections.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1aca2c1 to
9cbdc83
Compare

Self checklist
Task code
CYF-1039
Changelist
Questions
Most functions in this project are new to me, even though I have been able to understand their functions individually, I am not really confident to code with them. I will keep practicing and any advise would really be appreciated.