Skip to content

Commit 765fc43

Browse files
direct parameter
1 parent ca0f288 commit 765fc43

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎dead-code/exercise-1.js‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +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.
3-
const personName = "Aman";
4-
const greeting = "hello";
53

64
function sayHello(greeting, name) {
75
return `${greeting}, ${name}!`;
86
}
97

10-
console.log(sayHello(greeting, personName)); // 'hello, Aman!'
8+
console.log(sayHello("hello", "Aman")); // 'hello, Aman!'

0 commit comments

Comments
 (0)