Skip to content

Commit 652c4a9

Browse files
committed
Removing variables and adding arguments inline on function call
1 parent 16fd29e commit 652c4a9

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

‎dead-code/exercise-1.js‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
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-
const greeting = "hello";
5-
64
function sayHello(greeting, name) {
75
return `${greeting}, ${name}!`;
86
}
97

10-
const testName = "Aman";
11-
12-
const greetingMessage = sayHello(greeting, testName);
8+
const greetingMessage = sayHello("hello", "Aman");
139

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

0 commit comments

Comments
 (0)