Skip to content

Commit 3fc30ba

Browse files
authored
Revert changes
1 parent 85c1c84 commit 3fc30ba

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
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 = "Aman";
4+
let testName = "Jerry";
55
const greeting = "hello";
66

77
function sayHello(greeting, name) {
8-
return ${greeting}, ${name}!;
8+
const greetingStr = greeting + ", " + name + "!";
9+
return `${greeting}, ${name}!`;
10+
console.log(greetingStr);
911
}
1012

13+
testName = "Aman";
14+
1115
const greetingMessage = sayHello(greeting, testName);
1216

1317
console.log(greetingMessage); // 'hello, Aman!'

0 commit comments

Comments
 (0)