Skip to content

Commit 2b00771

Browse files
I removed the capitalisedPets variable as it unused code.
aslo removed the logPets function as it doesn't called.
1 parent c8ef645 commit 2b00771

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,8 @@
22
// The countAndCapitalisePets function should continue to work for any reasonable input it's given, and you shouldn't modify the pets variable.
33

44
const pets = ["parrot", "hamster", "horse", "dog", "hamster", "cat", "hamster"];
5-
const capitalisedPets = pets.map((pet) => pet.toUpperCase());
65
const petsStartingWithH = pets.filter((pet) => pet[0] === "h");
76

8-
function logPets(petsArr) {
9-
petsArr.forEach((pet) => console.log(pet));
10-
}
117

128
function countAndCapitalisePets(petsArr) {
139
const petCount = {};

0 commit comments

Comments
 (0)