Skip to content

West Midlands | May-26-ITP | Alina Sofragiu | Sprint 2 | Coursework#1385

Open
sofragiualina wants to merge 1 commit into
CodeYourFuture:mainfrom
sofragiualina:coursework/sprint-2
Open

West Midlands | May-26-ITP | Alina Sofragiu | Sprint 2 | Coursework#1385
sofragiualina wants to merge 1 commit into
CodeYourFuture:mainfrom
sofragiualina:coursework/sprint-2

Conversation

@sofragiualina

Copy link
Copy Markdown

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

Completed solutions to sprint 2 coursework

@sofragiualina sofragiualina 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 Jun 22, 2026
@jayshreehajgude2012 jayshreehajgude2012 added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jun 24, 2026

@jayshreehajgude2012 jayshreehajgude2012 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

handled errors correctly
implemented code correctly
Formatted output using inbuilt function correctly


// =============> write your explanation here
// =============> write your new code here
// =============> The error message says that str has already been declared this happens because str is already the function parameter,and the code tries to create another variable called str using let JavaScript does not allow a parameter and a let variable to have the same name in the same scope

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Correct error specified

console.log(decimalNumber);

// =============> write your explanation here
// =============> The error happens because decimalNumber is already a parameter of the function, so we cannot declare it again using const

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

correct explanation is given
Note: Try to understand the difference between let, var and const

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you for the feedback, I understand that the main issue is the difference between let, var, and const.I will review the differences between var, let, and const to strengthen my understanding of variable declarations and scope in JavaScript.

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

// =============> write your explanation here
// =============> the function only uses console.log() so it prints the result but does not return it when a function has no return, JavaScript returns undefined,which is why undefined appears in the final sentence

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

correct explanation
Note: explore undefined

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I will explore undefined further to improve my understanding of how JavaScript handles functions that do not explicitly return a value

@@ -1,5 +1,5 @@
// Predict and explain first...
// =============> write your prediction here
// =============> The sum of 10 and 32 is undefined because the function returns nothing

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Correct explaination

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you for the feedback

// You will need to declare a function called toPounds with an appropriately named parameter.

// You should call this function a number of times to check it works for different inputs
function toPounds(penceString) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

logic is correct
made use of inbuild functions for formatting output

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I still have a lot to learn about this but I understand that using built-in string methods helps format the output more cleanly and reliably

@jayshreehajgude2012 jayshreehajgude2012 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 Jun 24, 2026
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. 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. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants