Skip to content

Commit 23c3f17

Browse files
committed
dead code in its own branch, exercise 1 again
1 parent 3372770 commit 23c3f17

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

Sprint-2/Project-CLI-Treasure-Hunt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 4374e4e6b862b0a110e806b6115f3f6b3c22b26a

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

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

4-
let testName = "Jerry";
54
const greeting = "hello";
5+
const testName = "Aman";
66

7-
function sayHello(greeting, name) {
8-
const greetingStr = greeting + ", " + name + "!";
7+
const sayHello = (greeting, name) => {
98
return `${greeting}, ${name}!`;
10-
console.log(greetingStr);
11-
}
12-
13-
testName = "Aman";
9+
};
1410

1511
const greetingMessage = sayHello(greeting, testName);
1612

17-
console.log(greetingMessage); // 'hello, Aman!'
13+
console.log(greetingMessage); // 'hello, Aman!'

0 commit comments

Comments
 (0)