Skip to content

Conversation

enjoy15
Copy link

@enjoy15 enjoy15 commented Oct 15, 2025

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

#Changelist

-Completed all excercises in Sprint-2

@enjoy15 enjoy15 added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 15, 2025
@a-robson a-robson added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Oct 21, 2025
Copy link

@a-robson a-robson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job. You show a solid grasp of some Javascript fundamentals and your explanations are clear. There is just the one issue to address.

Comment on lines +25 to +34
function toPounds (penceString) {
const penceStringWithoutTrailingP = penceString.substring(0, penceString.length - 1);
const paddedPenceNumberString = penceStringWithoutTrailingP.padStart(3, "0");
const pounds = paddedPenceNumberString.substring(0, paddedPenceNumberString.length - 2);
const pence = paddedPenceNumberString
.substring(paddedPenceNumberString.length - 2)
.padEnd(2, "0");
return ${pounds}.${pence}`;
}
console.log(toPounds("399p"));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. However you should test the function with a number of different inputs. Thinking about different cases helps us make our code more robust. Can you add some examples of typical uses of the function? You might also like to think about types of input that the function won't handle well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added more examples of typical uses of the function and types of input that the function won't handle well.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent. Good work on the edge cases. I'll mark this review 'Complete'.

@a-robson a-robson added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Oct 21, 2025
@enjoy15 enjoy15 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 21, 2025
@a-robson a-robson added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Oct 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. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants