Skip to content

London | 26-ITP-Sep | Abakar Souleyman | Sprint 3 | dead code - #1739

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

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

Conversation

@abmhts

@abmhts abmhts commented Oct 20, 2026

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

Task code

CYF-1066

Changelist

Refactored by removing unused, unreachable, and redundant code.

@abmhts abmhts added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Oct 20, 2026
Comment thread dead-code/exercise-1.js Outdated
console.log(greetingStr);
}

testName = "Aman";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this override necessary ? Could there be a better way to initialise this variable

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.

Not necessary.
We can remove the redundant assignment and pass "Aman" directly to sayHello(), keeping the function flexible for any reasonable input.

Comment thread dead-code/exercise-1.js Outdated
@@ -5,9 +5,7 @@ let testName = "Jerry";
const greeting = "hello";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

does this variable name clash with another ?

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.

No, it doesn't clash with another. The function parameter greeting is in a different scope. However, we can remove the outer variable and pass "hello" directly to sayHello().

@madhuranakate madhuranakate 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 Oct 21, 2026
@abmhts abmhts 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