File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Sprint-2/2-mandatory-debug Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 11// Predict and explain first...
2- // =============> write your prediction here
2+ // =============> the function will not perform a + b and will return undefined in the
3+ console . log function
4+
35
46function sum ( a , b ) {
57 return ;
@@ -8,6 +10,14 @@ function sum(a, b) {
810
911console . log ( `The sum of 10 and 32 is ${ sum ( 10 , 32 ) } ` ) ;
1012
11- // =============> write your explanation here
13+ // =============> there shouldn't be a semi-colon after return
14+ // this will signify the end of function so a + b will not be performed therefore there
15+ // is no answer to return to print in the console.log function
16+
1217// Finally, correct the code to fix the problem
13- // =============> write your new code here
18+ // =============>
19+ // function sum(a, b) {
20+ // return a + b;
21+ // }
22+ // console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
23+
You can’t perform that action at this time.
0 commit comments