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 1b09621
Browse filesBrowse the repository at this point in the historyBrowse files
debug2604
authored and
debug2604
committed
2-mandatory-debug 0.js added Undefined in expectation.
// =============> console.log in local function will result the product. But console.log in global scope will not call function multiply.
3
+
// =============> Undefined. console.log in local function will result the product. But console.log in global scope will not call function multiply.
4
4
5
5
//function multiply(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
-
// =============> The function multiply does not really carry out the multiplication. It only logs the result of a*b. That's why calling multiply become undefined.
11
+
// =============> The function multiply does not really carry out the multiplication. It only logs the result of a*b. That's why calling multiply become undefined.
12
12
// Finally, correct the code to fix the problem
13
13
// =============> write your new code here
14
14
functionmultiply(a,b){
15
15
returna*b;
16
16
}
17
17
18
18
console.log(`The result of multiplying 10 and 32 is ${multiply(10,32)}`);
0 commit comments