Skip to content

Commit c77f1f1

Browse files
committed
combine variable declaration and assignment in ex1
1 parent f7dcf2a commit c77f1f1

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +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;
4+
let testName = "Aman";
55
const greeting = "hello";
66

77
function sayHello(greeting, name) {
88
return `${greeting}, ${name}!`;
99
}
1010

11-
testName = "Aman";
12-
1311
const greetingMessage = sayHello(greeting, testName);
1412

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

0 commit comments

Comments
 (0)