Skip to content

Commit 6fe47f8

Browse files
I added my prediction
1 parent 1d7c01b commit 6fe47f8

File tree

1 file changed

+4
-2
lines changed
  • Sprint-2/2-mandatory-debug

1 file changed

+4
-2
lines changed

Sprint-2/2-mandatory-debug/1.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Predict and explain first...
22
// =============> write your prediction here
3-
//
3+
// I predicted that the function will not return the correct result because the return statment is not correctly declared.
44

55
function sum(a, b) {
66
return;
@@ -13,7 +13,9 @@ console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
1313
when I run the program it give this output:
1414
The sum of 10 and 32 is undefined
1515

16-
the output is undefiened because the function sum does not return any CSSMathValue. to fix this error we need to change the return statement to return a + b instead of just return.
16+
the output is undefiened because the function sum does not return any value.
17+
to fix this error we need to change the return statement to return a + b instead of just return.
18+
1719
// Finally, correct the code to fix the problem
1820
// =============> write your new code here
1921
function sum(a, b) {

0 commit comments

Comments
 (0)