File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Sprint-2/2-mandatory-debug Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change 11// Predict and explain first...
22
33// =============> write your prediction here
4+ // When multiply(10, 32) runs, it prints 320, But the function does not return anything.
45
5- function multiply ( a , b ) {
6- console . log ( a * b ) ;
7- }
86
9- console . log ( `The result of multiplying 10 and 32 is ${ multiply ( 10 , 32 ) } ` ) ;
7+ // function multiply(a, b) {
8+ // console.log(a * b);
9+ // }
10+
11+ // console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
1012
1113// =============> write your explanation here
14+ // multiply prints the result but does not return anything, so using it in a template string shows undefined.
1215
1316// Finally, correct the code to fix the problem
1417// =============> write your new code here
18+ function multiply ( a , b ) {
19+ return ( a * b )
20+ }
21+
22+ console . log ( multiply ( 10 , 32 ) ) ;
You can’t perform that action at this time.
0 commit comments