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
// =============> there is no return statement, therefore, you cannot use the result of the function in a console log. The function will run but it will return undefined.
4
4
5
5
functionmultiply(a,b){
6
6
console.log(a*b);
7
7
}
8
8
9
9
console.log(`The result of multiplying 10 and 32 is ${multiply(10,32)}`);
10
10
11
-
// =============> write your explanation here
11
+
// =============> you need to add a return statement in order to use the result and so it can be displayed on the console.
12
12
13
13
// Finally, correct the code to fix the problem
14
-
// =============> write your new code here
14
+
// =============>
15
+
functionmultiply(a,b){
16
+
returna*b;
17
+
}
18
+
console.log(`The result of multiplying 10 and 32 is ${multiply(10,32)}`);
0 commit comments