Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sprint-3/dead-code/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Refactoring Dead Code

Here are two example of code that has not been built efficiently. Both files have dead code in them, it's your job to go back through this existing code, identify the dead code, and remove it so the code is ready for production.
Here are two example of code that has not been built efficiently. Both files have dead code in them. It's your job to go back through this existing code, identify the dead code, and remove it so the code is ready for production.

## Instructions

Expand Down
1 change: 1 addition & 0 deletions Sprint-3/dead-code/exercise-1.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Find the instances of unreachable and redundant code - remove them!
// The sayHello function should continue to work for any reasonable input it's given.

let testName = "Jerry";
const greeting = "hello";
Expand Down
1 change: 1 addition & 0 deletions Sprint-3/dead-code/exercise-2.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Remove the unused code that does not contribute to the final console log
// The countAndCapitalisePets function should continue to work for any reasonable input it's given, and you shouldn't modify the pets variable.

const pets = ["parrot", "hamster", "horse", "dog", "hamster", "cat", "hamster"];
const capitalisedPets = pets.map((pet) => pet.toUpperCase());
Expand Down
Loading