London | 26-ITP-Jan | Xuanming Hu | Sprint 1 | Coursework #1015
Open
Samual-Hu wants to merge 4 commits intoCodeYourFuture:mainfrom
Open
London | 26-ITP-Jan | Xuanming Hu | Sprint 1 | Coursework #1015Samual-Hu wants to merge 4 commits intoCodeYourFuture:mainfrom
Samual-Hu wants to merge 4 commits intoCodeYourFuture:mainfrom
Conversation
Edu-Vin
reviewed
Feb 21, 2026
Edu-Vin
left a comment
There was a problem hiding this comment.
The instructions for 2-mandatory-errors were not followed. Kindly recheck the files in this folder
| // Answer: There are 5 function calls in total. They are located on lines 4, 5, and 10. | ||
| // b) Run the code and identify the line where the error is coming from - why is this error occurring? How can you fix this problem? | ||
|
|
||
| // Answer: The error comes from line 5. It occurs because we are trying to reassign a value to `priceAfterOneYear`, which was originally declared as a `const`. To fix it, change `const` to `let` on line 2. |
Author
There was a problem hiding this comment.
Thanks for catching that. I've added the missing error explanations to all 5 files and corrected the function call count. Let me know if it looks good now.
Edu-Vin
reviewed
Feb 23, 2026
|
|
||
| // a) How many function calls are there in this file? Write down all the lines where a function call is made | ||
| // Answer: There are 5 function calls in total. They are located on lines 4, 5, and 10. | ||
| // Answer: There are 2 function calls in total. They are both `Number()` and are located on lines 4 and 5. |
There was a problem hiding this comment.
Your previous answer was correct. What I said was wrong was question b. Recheck your answer for question b
Author
There was a problem hiding this comment.
Apologies for the confusion. I have corrected question b.
Edu-Vin
suggested changes
Feb 23, 2026
This comment has been minimized.
This comment has been minimized.
1 similar comment
This comment has been minimized.
This comment has been minimized.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
slice,lastIndexOf) to extract file paths and extensions.constreassignment, execution order (Cannot access before initialization), incorrect data types, and invalid variable naming.substring,padStart,padEnd).Questions
None for now.