File tree Expand file tree Collapse file tree
Sprint-3/2-mandatory-debug Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// Predict and explain first...
22
33// =============> write your prediction here
4- // This function would multiply the two arguments a and b whatever that is
4+ // This function would multiply the two arguments a and b
55// when we log the output we will get the string and the output of the function but because we are not returning an output we might run into an error
66
77// function multiply(a, b) {
1111// console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
1212
1313// =============> write your explanation here
14- //The console.log() inside the funtion will print a*b but when we call the function will return undefined
14+ //The console.log() inside the function will print a*b but when we call the function will return the out put and undefined
15+ // but after the fix of returning instead it will be working giving the result in that instance will get 320
1516
1617// Finally, correct the code to fix the problem
1718// =============> write your new code here
1819function multiply ( a , b ) {
1920 return a * b ;
2021}
2122
22- console . log ( `The result of multiplying 10 and 32 is ${ multiply ( 10 , 32 ) } ` ) ;
23+ console . log ( `The result of multiplying 10 and 32 is ${ multiply ( 10 , 32 ) } ` ) ;
24+
25+ console . log ( multiply ( 10 , 32 ) )
You can’t perform that action at this time.
0 commit comments