Skip to content

Commit 85f49fd

Browse files
committed
update - removed redundant code
1 parent 3e4034f commit 85f49fd

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

‎dead-code/exercise-1.js‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
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";
6-
74
function sayHello(greeting, name) {
85
return `${greeting}, ${name}!`;
96
}
107

11-
testName = "Aman";
12-
13-
const greetingMessage = sayHello(greeting, testName);
14-
15-
console.log(greetingMessage); // 'hello, Aman!'
8+
console.log(sayHello("hello", "Aman"));

0 commit comments

Comments
 (0)