Skip to content

Commit 05a9485

Browse files
committed
Fix code to print 'hello Aman'
1 parent f920355 commit 05a9485

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎dead-code/exercise-1.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +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 = "Aman";
5+
const greeting = "hello";
6+
47
function sayHello(greeting, name) {
58
return `${greeting}, ${name}!`;
69
}
710

8-
console.log(sayHello("Hi", "Aman"));
11+
const greetingMessage = sayHello(greeting, testName);
12+
13+
console.log(greetingMessage);

0 commit comments

Comments
 (0)