File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed
Sprint-2/2-mandatory-debug Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,20 @@ function multiply(a, b) {
88
99console . log ( `The result of multiplying 10 and 32 is ${ multiply ( 10 , 32 ) } ` ) ;
1010
11+ //output= The result of multiplying 10 and 32 is undefined
12+
1113// =============> write your explanation here
14+ //The function runs console.log(10 * 32) print the result = 320
15+ // after it runs the function dosen't have a return anything ang gives = undefined.
1216
1317// Finally, correct the code to fix the problem
14- // =============> write your new code here
18+ // =============> to use the function that gives a result need to use RETURN not consol.log inside the function
19+
20+ function multiply ( a , b ) {
21+ const forAllMutiply = ( a * b ) ;
22+ return forAllMutiply ; //return can be use for diferents values/results
23+ }
24+
25+ console . log ( `The result of multiplying 10 and 32 is ${ multiply ( 10 , 32 ) } ` ) ;
26+
27+ //output= The result of multiplying 10 and 32 is 320
You can’t perform that action at this time.
0 commit comments