Skip to content

Conversation

HoussamLh
Copy link

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

  1. 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()

  2. mandatory-errors: Identified common learning mistakes (e.g., using const when let is needed)

  3. mandatory-interpret: Interpreted JavaScript behaviors like console.log, prompt(), and variable hoisting

  4. 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

HoussamLh and others added 20 commits June 19, 2025 07:48
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.
@HoussamLh HoussamLh added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 13, 2025
@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 17, 2025
Copy link
Contributor

@cjyuan cjyuan left a 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.

Comment on lines +25 to +27
// 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).
Copy link
Contributor

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?

Copy link
Author

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!

Copy link
Contributor

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?

@cjyuan cjyuan added the Reviewed Volunteer to add when completing a review with trainee action still to take. label Jul 17, 2025
@cjyuan
Copy link
Contributor

cjyuan commented Jul 21, 2025

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.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complete Volunteer to add when work is complete and all review comments have been addressed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants