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 b02c2d9 commit 40f4d05Copy full SHA for 40f4d05
Sprint-2/2-mandatory-debug/1.js
@@ -1,5 +1,8 @@
1
// Predict and explain first...
2
// =============> write your prediction here
3
+// the semicolon after "return" will hamper the return statement because it
4
+// will end the statement before it has been defined what it needs to return.
5
+
6
7
function sum(a, b) {
8
return;
@@ -9,5 +12,12 @@ function sum(a, b) {
9
12
console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
10
13
11
14
// =============> write your explanation here
15
+// as above
16
17
// Finally, correct the code to fix the problem
18
// =============> write your new code here
19
+function sum(a, b) {
20
+ return a + b;
21
+}
22
23
+console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
0 commit comments