Skip to content

London | 26-ITP-May | Damilola Odumosu | Sprint 2 | Coursework#1465

Open
d-odumosu wants to merge 12 commits into
CodeYourFuture:mainfrom
d-odumosu:coursework/sprint-2
Open

London | 26-ITP-May | Damilola Odumosu | Sprint 2 | Coursework#1465
d-odumosu wants to merge 12 commits into
CodeYourFuture:mainfrom
d-odumosu:coursework/sprint-2

Conversation

@d-odumosu

Copy link
Copy Markdown

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 mandatory and stretch

@d-odumosu d-odumosu 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. Module-Structuring-And-Testing-Data The name of the module. labels Jul 5, 2026
@Liam310 Liam310 added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 6, 2026
function capitalise(str){
str = `${str[0].toUpperCase()}${str.slice(0)}`;
return str
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Generally we reassign the value of a variable if we want to update the value whilst the recognising that what the value represents has stayed the same. Here, you're reassigning str to be something that represents a different thing. Considering this, can you think of an alternative approach to reassigning the existing str variable that would make this a little bit more readable?

Comment on lines +5 to +9
/* - The function will throw a syntax error because we have redeclared the parameter variable "decimalNumber", and we have
also used const for declaring percentage, percentage will change when we call the function with different arguments so it should
be declared using let.
- we are console logging the variable decimalNumber outside the function - the variable lives only inside the function
*/

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

we have also used const for declaring percentage, percentage will change when we call the function with different arguments so it should be declared using let

What exactly is the difference between const and let? Does it or does it not have an impact in this function?

@Liam310 Liam310 added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 6, 2026
@Liam310

Liam310 commented Jul 6, 2026

Copy link
Copy Markdown

Great work overall, just a couple of small comments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Structuring-And-Testing-Data The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants