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 651f59e commit a118f95Copy full SHA for a118f95
Sprint-2/2-mandatory-debug/1.js
@@ -1,5 +1,5 @@
1
// Predict and explain first...
2
-// =============> write your prediction here
+// =============> return shouldn't be separated by (;)
3
4
function sum(a, b) {
5
return;
@@ -8,6 +8,12 @@ function sum(a, b) {
8
9
console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
10
11
-// =============> write your explanation here
+// =============> semicolon ends the statement so it wouldn't return anything
12
// Finally, correct the code to fix the problem
13
// =============> write your new code here
14
+
15
+function sum(a, b) {
16
+ return a + b;
17
+}
18
19
+console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
0 commit comments