File tree Expand file tree Collapse file tree 1 file changed +19
-7
lines changed
Sprint-2/2-mandatory-debug Expand file tree Collapse file tree 1 file changed +19
-7
lines changed Original file line number Diff line number Diff line change 11// Predict and explain first...
2- // =============> write your prediction here
2+ // =============> looking at it I think the sytntaks is worng return; a+b;
3+
4+ // function sum(a, b) {
5+ // return;
6+ // a + b;
7+ // }
8+
9+ // console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
10+
11+ // =============>
12+ // I declare in the scope of function what a,b need to do return
13+ // call the function with the template literal
14+ // wich will give me the Text sentence with the result of any sum
15+
16+ // Finally, correct the code to fix the problem
17+ // =============>
318
419function sum ( a , b ) {
5- return ;
6- a + b ;
20+ const newSum = a + b ;
21+ return newSum ;
22+
723}
824
925console . log ( `The sum of 10 and 32 is ${ sum ( 10 , 32 ) } ` ) ;
10-
11- // =============> write your explanation here
12- // Finally, correct the code to fix the problem
13- // =============> write your new code here
You can’t perform that action at this time.
0 commit comments