You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// =============> write your prediction here : The function multipy does not return any value so the result of calling the function will be unknown.
4
4
5
-
functionmultiply(a,b){
6
-
console.log(a*b);
7
-
}
5
+
// function multiply(a, b) {
6
+
// console.log(a * b);
7
+
// }
8
8
9
-
console.log(`The result of multiplying 10 and 32 is ${multiply(10,32)}`);
9
+
// console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
10
10
11
-
// =============> write your explanation here
11
+
// =============> write your explanation here : Calling the function has logged the result in the console but it has not returned the result ot the multiplicaion so the second console.log outside the function has no value to print and has printed undefined.
12
12
13
13
// Finally, correct the code to fix the problem
14
14
// =============> write your new code here
15
+
// function multiply(a, b) {
16
+
// return a * b;
17
+
// }
18
+
19
+
// console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
0 commit comments