Skip to content

London|26-ITP-January|Alexandru Pocovnicu|Sprint 2|Acoursework #921

Open
alexandru-pocovnicu wants to merge 14 commits intoCodeYourFuture:mainfrom
alexandru-pocovnicu:acoursework/sprint-2
Open

London|26-ITP-January|Alexandru Pocovnicu|Sprint 2|Acoursework #921
alexandru-pocovnicu wants to merge 14 commits intoCodeYourFuture:mainfrom
alexandru-pocovnicu:acoursework/sprint-2

Conversation

@alexandru-pocovnicu
Copy link

@alexandru-pocovnicu alexandru-pocovnicu commented Jan 29, 2026

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

In this repo I have predicted errors, interpreted error messages, debbuged and implemented functions according to requrements

@github-actions

This comment has been minimized.

@alexandru-pocovnicu alexandru-pocovnicu added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jan 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 Jan 29, 2026
@github-actions

This comment has been minimized.

3 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@alexandru-pocovnicu alexandru-pocovnicu changed the title London|26-ITP-January|Alexandru Pocovnicu|Acoursework/sprint 2 London|26-ITP-January|Alexandru Pocovnicu|Acoursework sprint 2 Jan 29, 2026
@github-actions

This comment has been minimized.

@alexandru-pocovnicu alexandru-pocovnicu changed the title London|26-ITP-January|Alexandru Pocovnicu|Acoursework sprint 2 London|26-ITP-January|Alexandru Pocovnicu|Sprint 2|Acoursework Jan 29, 2026
@alexandru-pocovnicu alexandru-pocovnicu added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jan 29, 2026
// =============> Write your prediction here: all 3 logs will be '3'

const num = 103;
// const num = 103;
Copy link
Contributor

Choose a reason for hiding this comment

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

Note:
Deleting the global num is optional. Within the function block, num is resolved to the parameter num.
If you are interested in the topic, you can looking up these two concepts, identifier scope and identifier resolution, in the context of JavaScript programming. ChatGPT can give a good explanation.

Choose a reason for hiding this comment

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

thank you , i did indeed think wrongly that if a globally declared variable and a parameter shared the same name they would be the same thing

// Use the MDN string documentation to help you find a solution
// This might help https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase
function upperSnakeCase(str){
return str.toUpperCase().split(" ").join("_")
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: The two string methods .replace() and .replaceAll() can probably perform better on this task.

Comment on lines 7 to 18
const minutes = time.slice(-2);
if (hours === 0) {
return `12:${minutes} am`;
}
if (hours === 12) {
return `12:${minutes} pm`;
}
if (hours > 12) {
return `${hours - 12}:00 pm`;
return `${hours - 12}:${minutes} pm`;
}
return `${time} am`;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you make the format of the returned value more consistent?

Currently the formats of the return value of formatAs12HourClock("01:23") and formatAs12HourClock("13:23") are not quite the same.

@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 Feb 12, 2026
@alexandru-pocovnicu
Copy link
Author

thank you

@alexandru-pocovnicu alexandru-pocovnicu added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Feb 12, 2026
@cjyuan
Copy link
Contributor

cjyuan commented Feb 12, 2026

Changes look good. Well done.

@cjyuan cjyuan 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. labels Feb 12, 2026
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.

2 participants