Skip to content

London | 26-ITP-Sep | Bartosz Kawiak | Sprint 3 | dead-code - #1651

Open
bartoszkawiak wants to merge 1 commit into
CodeYourFuture:mainfrom
bartoszkawiak:coursework/sprint-3-dead-code
Open

bartoszkawiak wants to merge 1 commit into
CodeYourFuture:mainfrom
bartoszkawiak:coursework/sprint-3-dead-code

Conversation

@bartoszkawiak

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 unreachable, redundant, and unused code from the exercises while keeping the functions working as expected.

@bartoszkawiak bartoszkawiak added 📅 Sprint 3 Assigned during Sprint 3 of this module 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. labels Oct 5, 2026

@abdishakoor-dev abdishakoor-dev left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Only the dead code is gone and both files print exactly what they did before. Returning greetingStr instead of building the same string a second time is a tidy choice. Marking this Complete.

Two optional things:

  1. In exercise-1.js, "Jerry" on line 4 is stored but never read, because line 12 replaces it with "Aman" before anything uses testName. Could lines 4 and 12 become a single line?
  2. The line you removed used a template literal, `${greeting}, ${name}!`. Both give the same result, but template literals are usually easier to read, because you can see the shape of the final string. Which would you keep if you did this again?

@abdishakoor-dev abdishakoor-dev 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 Oct 7, 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. Module-Structuring-And-Testing-Data The name of the module. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants