Skip to content

Commit 1723e24

Browse files
dead code removed
1 parent 3372770 commit 1723e24

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

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

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
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";
5-
const greeting = "hello";
64

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

15-
const greetingMessage = sayHello(greeting, testName);
6+
export function sayHello(greeting, name) {
7+
return `${greeting}, ${name}!`;
168

17-
console.log(greetingMessage); // 'hello, Aman!'
9+
}
10+
console.log(sayHello("hello", "Aman"))
11+
console.log(sayHello("hello", "Arun"));

0 commit comments

Comments
 (0)