Skip to content

Commit a638efe

Browse files
reset file Sprint-2/2-mandatory-debug/0.js
1 parent ce9e5c1 commit a638efe

File tree

1 file changed

+6
-12
lines changed
  • Sprint-2/2-mandatory-debug

1 file changed

+6
-12
lines changed

Sprint-2/2-mandatory-debug/0.js

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,14 @@
11
// Predict and explain first...
22

33
// =============> write your prediction here
4-
// function will return with result of multiplication of given parameters (i,e: a times b)
5-
// function multiply(a, b) {
6-
// console.log(a * b);
7-
// }
8-
9-
// console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
10-
11-
// =============> write your explanation here
12-
// the function does not return any thing, so as result ${multiply(10, 32)} --> will return as "undefined"
13-
// Finally, correct the code to fix the problem
14-
// =============> write your new code here
154

165
function multiply(a, b) {
17-
return a * b;
6+
console.log(a * b);
187
}
198

209
console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
10+
11+
// =============> write your explanation here
12+
13+
// Finally, correct the code to fix the problem
14+
// =============> write your new code here

0 commit comments

Comments
 (0)