File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Sprint-2/2-mandatory-debug Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 1- // Predict and explain first...
1+ // Predict and explain first: This function is supposed to multiply two numbers and return the result.
22
3- // =============> write your prediction here
3+ // =============> write your prediction here : The result will be the multiplication of the two numbers.
44
55function multiply ( a , b ) {
66 console . log ( a * b ) ;
77}
88
99console . log ( `The result of multiplying 10 and 32 is ${ multiply ( 10 , 32 ) } ` ) ;
1010
11- // =============> write your explanation here
11+ // =============> write your explanation here : The function is logging the result of the console.log statement
12+ // but it is not returning any value. That's because we are using console.log instead of return in the function.
1213
1314// Finally, correct the code to fix the problem
14- // =============> write your new code here
15+ // =============> write your new code here :
16+ // function multiply(a, b) {
17+ // return a * b;
18+ // }
19+ // console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
You can’t perform that action at this time.
0 commit comments