diff --git a/Sprint-3/dead-code/README.md b/Sprint-3/dead-code/README.md index 785101d3..2bfbfff8 100644 --- a/Sprint-3/dead-code/README.md +++ b/Sprint-3/dead-code/README.md @@ -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 diff --git a/Sprint-3/dead-code/exercise-1.js b/Sprint-3/dead-code/exercise-1.js index 6077b36f..4d09f15f 100644 --- a/Sprint-3/dead-code/exercise-1.js +++ b/Sprint-3/dead-code/exercise-1.js @@ -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"; diff --git a/Sprint-3/dead-code/exercise-2.js b/Sprint-3/dead-code/exercise-2.js index df0e3b45..56d7887c 100644 --- a/Sprint-3/dead-code/exercise-2.js +++ b/Sprint-3/dead-code/exercise-2.js @@ -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());