File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Sprint-2/2-mandatory-debug Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 11// Predict and explain first...
22
33// =============> write your prediction here
4-
5- function multiply ( a , b ) {
6- console . log ( a * b ) ;
7- }
8-
9- console . log ( `The result of multiplying 10 and 32 is ${ multiply ( 10 , 32 ) } ` ) ;
4+ // in console.log we should just write (multiply(10,32) because writing in plain english will give us an error,
5+ // and it won't give the output.
106
117// =============> write your explanation here
8+ // the code was broken because the console.log was inside the function it not a function,
9+ //by using the return it gives us the correct output.
1210
1311// Finally, correct the code to fix the problem
1412// =============> write your new code here
13+ function multiply ( a , b ) {
14+ return ( a * b )
15+ }
16+
17+ console . log ( multiply ( 10 , 32 ) ) ;
You can’t perform that action at this time.
0 commit comments