Skip to content

Commit c09ebf4

Browse files
authored
Refactor sayHello function to use template literals
Removed unnecessary variable and console log from sayHello function.
1 parent 3372770 commit c09ebf4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

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

77
function sayHello(greeting, name) {
8-
const greetingStr = greeting + ", " + name + "!";
8+
99
return `${greeting}, ${name}!`;
10-
console.log(greetingStr);
10+
1111
}
1212

1313
testName = "Aman";

0 commit comments

Comments
 (0)