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 42ce6cb commit 8486d54Copy full SHA for 8486d54
Sprint-2/2-mandatory-debug/1.js
@@ -1,13 +1,21 @@
1
// Predict and explain first...
2
// =============> write your prediction here
3
+// The function sum does not return anything,
4
+// so the console will show "The sum of 10 and 32 is undefined".
5
-function sum(a, b) {
- return;
6
- a + b;
7
-}
+// function sum(a, b) {
+// return
8
+// a + b;
9
+// }
10
-console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
11
+// console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
12
13
// =============> write your explanation here
14
// Finally, correct the code to fix the problem
15
// =============> write your new code here
16
+
17
+function sum(a, b) {
18
+ return (a+b);
19
+}
20
21
+console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
0 commit comments