Skip to content

Commit b3b6efd

Browse files
committed
update to exercise-2 to remove dead code not just comment it out
1 parent d257d62 commit b3b6efd

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@
22
// The sayHello function should continue to work for any reasonable input it's given.
33

44
const greeting = "hello";
5-
65
function sayHello(greeting, name) {
76
return `${greeting}, ${name}!`;
87
}
98

109
testName = "Aman";
11-
1210
const greetingMessage = sayHello(greeting, testName);
13-
1411
console.log(greetingMessage); // 'hello, Aman!'

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +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-
//}
11-
127
function countAndCapitalisePets(petsArr) {
138
const petCount = {};
149

0 commit comments

Comments
 (0)