Skip to content

Conversation

@SabitaShrestha325
Copy link

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with COHORT_NAME | FIRST_NAME LAST_NAME | REPO_NAME | WEEK
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

Questions

Ask any questions you have for your reviewer.

@SabitaShrestha325 SabitaShrestha325 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 11, 2025
@SabitaShrestha325 SabitaShrestha325 changed the title ITP-JAN2025|Sabita-Shrestha|Module-Structuring-and-Testing-Data|Week6|2sprint ITP-JAN2025-London|Sabita-Shrestha|Module-Structuring-and-Testing-Data|Week6|2sprint Feb 11, 2025
@cjyuan cjyuan added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Feb 21, 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.

I think you understand the code but some of your explanations are not quite correct or have grammar mistake. I would suggest trying ChatGPT more often.

I left you some suggestions.
Feel free to mark this as completed after you make the necessary changes.

console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);

// =============> write your explanation here
// =============> write your explanation here: function will be undefined because of ";" by removing ; placing a+b in same line will return function.
Copy link
Contributor

Choose a reason for hiding this comment

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

Between "return value" and "function", which one is undefined?

// =============> write the output here: 3 for all console.log.
// Explain why the output is the way it is
// =============> write your explanation here
// =============> write your explanation here: 3 for all of the the console.log because it won't take any argument it will always take const argument.
Copy link
Contributor

Choose a reason for hiding this comment

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

It has nothing to do with const.
May I suggest asking ChatGPT "How does the identifier resolution work in Javascript?".

Comment on lines 17 to 21
const text = `hello there`;
console.log(text.toUpperCase());

const sentence = `lord of the rings`;
console.log(sentence.toUpperCase());
Copy link
Contributor

Choose a reason for hiding this comment

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

Your code does not yet satisfy the requirement. Can you reread what the spec ask for exactly?

Comment on lines 7 to 23
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}`;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

If you are using VSCode to edit the code, your can right-click the editor and select "Format Document" to ident the code to make the code easier to read.

Comment on lines 25 to 27
console.log(`The last digit of 399p is ${toPounds("399p")}`);
console.log(`The last digit of 52p is ${toPounds("52p")}`);
console.log(`The last digit of 1099p is ${toPounds("1099p")}`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the function toPounds() return the last digit of the given parameter?

@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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Feb 21, 2025
@SabitaShrestha325 SabitaShrestha325 added the Complete Volunteer to add when work is complete and all review comments have been addressed. label Feb 26, 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. 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.

3 participants