There was an error while loading. Please reload this page.
1 parent ac68c4a commit 49726c9Copy full SHA for 49726c9
1 file changed
Sprint-3/2-mandatory-debug/1.js
@@ -1,13 +1,20 @@
1
// Predict and explain first...
2
// =============> write your prediction here
3
+// Going to show undefined
4
-function sum(a, b) {
5
- return;
6
- a + b;
7
-}
+// function sum(a, b) {
+// return;
+// a + b;
8
+// }
9
10
console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
11
12
// =============> write your explanation here
13
+// the code is not doing the sum needed of a + b as they are just split by the ; ,
14
+
15
// Finally, correct the code to fix the problem
16
// =============> write your new code here
17
18
+function sum(a, b) {
19
+ return a + b;
20
+}
0 commit comments