File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Sprint-2/2-mandatory-debug Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 22
33// =============> write your prediction here
44
5+ // The function prints to the console by multiplying the parameter `a` and `b`
6+
57function multiply ( a , b ) {
68 console . log ( a * b ) ;
79}
@@ -10,5 +12,14 @@ console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
1012
1113// =============> write your explanation here
1214
15+ // I missed line 11, the function does indeed prints to the console but returns nothing
16+ // which explains `undefined` in the string interpolation of the function
17+
1318// Finally, correct the code to fix the problem
1419// =============> write your new code here
20+
21+ function product ( a , b ) {
22+ const result = a * b ;
23+ console . log ( result )
24+ return result ;
25+ }
You can’t perform that action at this time.
0 commit comments