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
{{ message }}
Repository navigation
Commit b06efe8
Browse filesBrowse the repository at this point in the historyBrowse files
// the function will multiply the values stored in the parameter. within the function scope the console.log, logs the answer but it does not return one.
2
3
3
4
// =============> write your prediction here
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
12
13
14
+
//first step creates a function called multiply with two parameters
15
+
//Then we would have to call the function, and still within the function scope we have to write return so we can get the result back.
16
+
//console.log then runs the code to put the result in the right place
17
+
13
18
// Finally, correct the code to fix the problem
14
19
// =============> write your new code here
20
+
21
+
functionmultiply(a,b){
22
+
returna*b;
23
+
}
24
+
console.log(`The result of multiplyig 10 and 32 is ${multiply(10,32)}`);
0 commit comments