Skip to content

Commit 20fcc14

Browse files
committed
exercise-1 committed
1 parent 9ae7a59 commit 20fcc14

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/**
2+
*
13
// Find the instances of unreachable and redundant code - remove them!
24
// The sayHello function should continue to work for any reasonable input it's given.
35
@@ -15,3 +17,22 @@ testName = "Aman";
1517
const greetingMessage = sayHello(greeting, testName);
1618
1719
console.log(greetingMessage); // 'hello, Aman!'
20+
*
21+
*/
22+
23+
// Find the instances of unreachable and redundant code - remove them!
24+
// The sayHello function should continue to work for any reasonable input it's given.
25+
26+
let testName = "Jerry";
27+
const greeting = "hello";
28+
29+
function sayHello(greeting, name) {
30+
return `${greeting}, ${name}!`;
31+
}
32+
33+
testName = "Aman";
34+
35+
const greetingMessage = sayHello(greeting, testName);
36+
37+
console.log(greetingMessage); // 'hello, Aman!'
38+

0 commit comments

Comments
 (0)