Skip to content

London | 26-May-ITP | Jorvan White | Sprint 2 | Coursework - #1574

Open
JorvanW wants to merge 16 commits into
CodeYourFuture:mainfrom
JorvanW:coursework/sprint-2
Open

London | 26-May-ITP | Jorvan White | Sprint 2 | Coursework#1574
JorvanW wants to merge 16 commits into
CodeYourFuture:mainfrom
JorvanW:coursework/sprint-2

Conversation

@JorvanW

@JorvanW JorvanW commented Jul 26, 2026

Copy link
Copy Markdown

London | 26-May-ITP | Jorvan White | Sprint 2 | Coursework

Learners, PR Template

Self checklist

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

Changelist

This is the Pull request for Module-Structuring and Testing Sprint 2

@github-actions

This comment has been minimized.

@JorvanW JorvanW added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 26, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 26, 2026
@JorvanW JorvanW added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 29, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions Bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 29, 2026
@JorvanW JorvanW added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 3, 2026
Comment on lines +21 to +26
function convertToPercentage(decimalNumber) {
decimalNumber = 0.5;
const percentage = `${decimalNumber * 100}%`;
return percentage;
}
console.log (convertToPercentage(0.5)); No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

With the current implementation, the function will always return "50%".
How would you modify the function so that it can be easily reused to convert different numbers to their equivalent percentages?

Comment on lines +19 to +24
function Capitalise(inputString) {
return inputString.toUpperCase()

}

Console.log(Capitalise("hello there")); No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

  • Does this function return "LORD_OF_THE_RINGS" when its parameter is "lord of the rings"?

  • Note: The convention of variable and function names in JavaScript is lower camel case -- the name begins with a lowercase letter.

Comment on lines +10 to +23
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");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The objective of this exercise is to define a function that accepts a pence string as its argument and returns an equivalent pound string.

@cjyuan cjyuan 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. labels Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants