Skip to content

Commit ed608a1

Browse files
committed
Add a little more guidance to dead code exercise
Taken to the extreme, someone could e.g. just replace the code with `console.log("HAMSTER: 3, HORSE: 1")`.
1 parent c89c066 commit ed608a1

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

Sprint-3/dead-code/exercise-1.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Find the instances of unreachable and redundant code - remove them!
2+
// The sayHello function should continue to work for any reasonable input it's given.
23

34
let testName = "Jerry";
45
const greeting = "hello";

Sprint-3/dead-code/exercise-2.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Remove the unused code that does not contribute to the final console log
2+
// The countAndCapitalisePets function should continue to work for any reasonable input it's given, and you shouldn't modify the pets variable.
23

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

0 commit comments

Comments
 (0)