London | 26-ITP-May | Gideon Defar | Sprint 1 | Coursework - #1553
London | 26-ITP-May | Gideon Defar | Sprint 1 | Coursework#1553gideondefar wants to merge 8 commits into
Conversation
| const ext = ; | ||
|
|
||
| const dir = filePath.slice(0, lastSlashIndex); | ||
| const ext = filePath.slice(lastDotIndex); |
There was a problem hiding this comment.
It looks like lastDotIndex has not been defined before it is used here.
| const 12HourClockTime = "8:53pm"; | ||
| const 24hourClockTime = "20:53"; | ||
| const HourClockTime = "8:53pm"; | ||
| const hourClockTime = "20:53"; |
There was a problem hiding this comment.
Could we name these variables more consistently and make the time format clear in each name?
|
|
||
| carPrice = Number(carPrice.replaceAll(",", "")); | ||
| priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," "")); | ||
| //priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," "")); |
There was a problem hiding this comment.
Generally it’s good practice to remove commented-out code once it’s no longer needed. It helps keep the code clean and makes it easier for others to read.
|
|
||
| /* | ||
| a) There are two functions Line 4 & 5: | ||
| for eg, The expression Number(carPrice.replaceAll(",","")) is doing the following: |
There was a problem hiding this comment.
Take another look at the function calls in this file. How many function calls are there in total?
|
I believe 0.js and 3.js in the mandatory errors section also require a solution. I also noticed that not all of the files run without errors. As a general practice, it’s worth running each file before pushing your changes to make sure there are no syntax or runtime errors. |
|
Note: It seems this PR has been reviewed. So I changed to label to |
Self checklist
Changelist
In this PR, I have completed the required Sprint 1 coursework exercises.
Questions
How do you recommend formatting long multi-line explanations or breakdowns for formulas in the code? Is a detailed block comment preferred over individual single-line comments according to the style guide?