We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3372770 commit f3378b3Copy full SHA for f3378b3
1 file changed
Sprint-3/3-dead-code/exercise-1.js
@@ -1,17 +1,17 @@
1
// Find the instances of unreachable and redundant code - remove them!
2
// The sayHello function should continue to work for any reasonable input it's given.
3
4
-let testName = "Jerry";
+// let testName = "Jerry"; - redundant
5
const greeting = "hello";
6
7
function sayHello(greeting, name) {
8
- const greetingStr = greeting + ", " + name + "!";
+ // const greetingStr = greeting + ", " + name + "!"; - redundant
9
return `${greeting}, ${name}!`;
10
- console.log(greetingStr);
+ // console.log(greetingStr); - redundant
11
}
12
13
testName = "Aman";
14
15
-const greetingMessage = sayHello(greeting, testName);
+const greetingMessage = sayHello(greeting, testName);
16
17
console.log(greetingMessage); // 'hello, Aman!'
0 commit comments