Skip to content

Commit 54f9242

Browse files
committed
removed redundant and code
1 parent b31a586 commit 54f9242

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ let testName = "Jerry";
55
const greeting = "hello";
66

77
function sayHello(greeting, name) {
8-
const greetingStr = greeting + ", " + name + "!";
8+
//const greetingStr = greeting + ", " + name + "!";
9+
// - removing this line as this is redundant code and duplicated inside the return
910
return `${greeting}, ${name}!`;
10-
console.log(greetingStr);
11+
//console.log(greetingStr);
12+
// - removing this line because after return the console.log will not execute
1113
}
1214

1315
testName = "Aman";

0 commit comments

Comments
 (0)