File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Sprint-2/2-mandatory-debug Expand file tree Collapse file tree 1 file changed +11
-7
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: The function will not return the sum of a and b because there is a syntax error.
33
4- function sum ( a , b ) {
5- return ;
6- a + b ;
7- }
4+ // function sum(a, b) {
5+ // return;
6+ // a + b;
7+ // }
88
9- console . log ( `The sum of 10 and 32 is ${ sum ( 10 , 32 ) } ` ) ;
9+ // console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
1010
11- // =============> write your explanation here
11+ // =============> write your explanation here : return should be on the same line as a + b.
1212// Finally, correct the code to fix the problem
1313// =============> write your new code here
14+ function sum ( a , b ) {
15+ return a + b ;
16+ }
17+ console . log ( `The sum of 10 and 32 is ${ sum ( 10 , 32 ) } ` ) ;
You can’t perform that action at this time.
0 commit comments