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 a1ffce9 commit 7d24e37Copy full SHA for 7d24e37
Sprint-3/3-dead-code/exercise-1.js
@@ -1,10 +1,15 @@
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 = "Chris";
5
const greeting = "hello";
6
7
function sayHello(greeting, name) {
+ const greetingStr = greeting + ", " + name + "!";
8
return `${greeting}, ${name}!`;
9
}
10
-console.log(sayHello(greeting, testName));
+
11
+testName = "Aman";
12
13
+const greetingMessage = sayHello(greeting, testName);
14
15
+console.log(greetingMessage); // 'hello, Aman!'
0 commit comments