Skip to content

West-Midlands | 26-ITP-May | Maryam Janjua | Sprint 3 | Dead Code - #1605

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

West-Midlands | 26-ITP-May | Maryam Janjua | Sprint 3 | Dead Code#1605
maryam-devio wants to merge 2 commits into
CodeYourFuture:mainfrom
maryam-devio:coursework/sprint-3-dead-code

Conversation

@maryam-devio

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

Changelist

Removed dead and redundant code while preserving the program's original behavior.

@maryam-devio maryam-devio added 📅 Sprint 3 Assigned during Sprint 3 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 Aug 5, 2026
@jimoholayinka01 jimoholayinka01 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 Aug 6, 2026
@jimoholayinka01

Copy link
Copy Markdown

Nice job removing the dead code instead of commenting it out that keeps the PR focused on the exercise. One thing to check though: you've removed the declaration of testName, but it's still being used later in the file.

testName = "Aman";

Since testName is no longer declared, this will cause an error. The goal is to remove only dead code while preserving the existing behaviour, so could you restore the declaration and only remove code that isn't used?

@jimoholayinka01 jimoholayinka01 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 Aug 6, 2026
@maryam-devio

maryam-devio commented Aug 6, 2026

Copy link
Copy Markdown
Author

Thank you for your feedback! You're absolutely right. My version wasn't running in strict mode, so I overlooked the missing declaration. I understand the importance of explicitly declaring variables with const and let for clarity and correctness.
I accidentally omitted const when declaring testName. I've corrected it now. Thank you for pointing it out!

@maryam-devio maryam-devio 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 Aug 6, 2026
@jimoholayinka01

Copy link
Copy Markdown

Well done. Your code is now error free and I will mark this as completed.

@jimoholayinka01 jimoholayinka01 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 Aug 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