Skip to content

London | 26-ITP-Sep | Mahir Shah | Sprint 3 | Refactoring Dead Code - #1704

Open
MahirShah300 wants to merge 3 commits into
CodeYourFuture:mainfrom
MahirShah300:coursework/sprint-3-dead-code
Open

MahirShah300 wants to merge 3 commits into
CodeYourFuture:mainfrom
MahirShah300:coursework/sprint-3-dead-code

Conversation

@MahirShah300

Copy link
Copy Markdown

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

Task code

CYF-1066

Changelist

Removed unused and unneeded code.

@MahirShah300 MahirShah300 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 14, 2026
@webmonch
webmonch self-requested a review October 20, 2026 21:43
@webmonch webmonch 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 Oct 20, 2026
Comment thread dead-code/exercise-1.js

function sayHello(greeting, name) {
const greetingStr = greeting + ", " + name + "!";
return `${greeting}, ${name}!`;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Did you manage to run this file after your changes?

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.

Fixed it by making Aman a string

Comment thread dead-code/exercise-1.js
function sayHello(greeting, name) {
const greetingStr = greeting + ", " + name + "!";
return `${greeting}, ${name}!`;
console.log(greetingStr);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice! Good catch that this won't run after return.

@webmonch

Copy link
Copy Markdown

Good job! You identified all of the dead code in both exercises, and exercise 2 is spot on. Worth having another look at exercise 1 to make sure all good there.

@webmonch webmonch 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 Oct 20, 2026
@MahirShah300 MahirShah300 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 Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants