File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Sprint-2/2-mandatory-debug Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11// Predict and explain first...
2- // =============> write your prediction here
2+ // =============> write your prediction here : A syntax error for the semicolon after return.
33
44function sum ( a , b ) {
55 return ;
@@ -8,6 +8,11 @@ function sum(a, b) {
88
99console . log ( `The sum of 10 and 32 is ${ sum ( 10 , 32 ) } ` ) ;
1010
11- // =============> write your explanation here
11+ // =============> write your explanation here : The semicolon after return end the statement. So there will be no value returned from the function.
12+
1213// Finally, correct the code to fix the problem
1314// =============> write your new code here
15+ function sum ( a , b ) {
16+ return a + b ;
17+ }
18+ console . log ( `The sum of 10 and 32 is ${ sum ( 10 , 32 ) } ` ) ;
You can’t perform that action at this time.
0 commit comments