-
-
Notifications
You must be signed in to change notification settings - Fork 196
London | May 2025 | Houssam Lahlah | Coursework/sprint 1 #657
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
Added comments to exclude instructional lines from execution
Updated age variable to let to allow incrementing its value.
Declare variable before using in template string.
Add comments explaining slice error and fix by converting number to string.
Fix invalid variable names by renaming to start with letters instead of numbers.
Add missing comma to replaceAll so the code runs smoothly.
Add detailed comments answering questions about movie length time calculation.
Add detailed comments explaining step-by-step price formatting from pence string.
… and store the ext part of the variable
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.
Your explanation is clear. I only have some suggestions and a questions.
// 5. Extracts the last two characters as the pence part. | ||
// For "399", this is "99". | ||
// Then pads the string on the right with zeros if it’s shorter than 2 characters (not needed here). |
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.
When you mentioned "not needed here", do you mean we can delete .padEnd(2, "0")
at line 24?
Could we expect this program to work as intended for any valid penceString
if we deleted .padEnd(2, "0")
from the code?
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.
heloo,
Yes, I meant that .padEnd(2, "0") isn’t needed in this case. If we remove it, the program should still work correctly for any valid penceString, as long as it’s properly formatted.
Thanks for checking!
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 it is safe to delete .padEnd(2, "0")
from this script?
Thanks for responding to each of my comments. In the future (within CYF courses), I think it might be a good idea to change the label to "Needs label" to clearly signal that your responses/changes are ready to be reviewed. |
Self Checklist
I have committed my files one by one, on purpose, and for a reason
I have titled my PR with REGION | COHORT_NAME | FIRST_NAME LASTNAME | PROJ_NAME
I have tested my changes (where applicable)
My changes follow the style guide
My changes meet the requirements of this task
Changelist
key-exercise:
Practiced variable reassignment with count = count + 1
Extracted initials from full names using charAt(0)
Parsed file paths using slice() and lastIndexOf()
Explained how random numbers are generated with Math.random() and Math.floor()
mandatory-errors: Identified common learning mistakes (e.g., using const when let is needed)
mandatory-interpret: Interpreted JavaScript behaviors like console.log, prompt(), and variable hoisting
stretch-explore: Explored the Chrome DevTools Console and JavaScript built-in methods like alert(), prompt(), and typeof
Questions
Hello,
I’ve completed all parts of the Sprint 1 and opened this pull request for review. Could you please take a look and let me know:
Are my explanations clear and technically correct, especially in the key-exercise and mandatory-interpret sections?
Do the solutions meet the expectations for this stage of the course?
Is there anything I could improve in the way I write comments or explain code logic?
Any feedback would be appreciated — thank you for your time!
Best regards,
Sami