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
//line 7 will log the result of a * b, line 10 will throw an error since the function does not return anything so it will say The result of multiplying 10 and 32 is undefined.
4
5
5
-
functionmultiply(a,b){
6
-
console.log(a*b);
7
-
}
6
+
//function multiply(a, b) {
7
+
// console.log(a * b);
8
+
//}
8
9
9
-
console.log(`The result of multiplying 10 and 32 is ${multiply(10,32)}`);
10
+
//console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
10
11
11
12
// =============> write your explanation here
13
+
//since the function does not return a value we get undefined passed back to the console.
12
14
13
15
// Finally, correct the code to fix the problem
14
16
// =============> write your new code here
17
+
functionmultiply(a,b){
18
+
returna*b;
19
+
}
20
+
21
+
console.log(`The result of multiplying 10 and 32 is ${multiply(10,32)}`);
0 commit comments