File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Sprint-2/2-mandatory-debug Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 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
55function sum ( a , b ) {
66 return ;
@@ -13,7 +13,9 @@ console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
1313when I run the program it give this output:
1414The 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
1921function sum ( a , b ) {
You can’t perform that action at this time.
0 commit comments