Skip to content

Commit 812128c

Browse files
committed
write addition explanation for the prediction part
1 parent 24c915a commit 812128c

File tree

1 file changed

+7
-5
lines changed
  • Sprint-2/2-mandatory-debug

1 file changed

+7
-5
lines changed

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

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

3-
// =============> write your prediction here : There is no return statement for the parameters.
3+
// =============> write your prediction here : This function doesn’t have a return statement.
4+
// That means: even though it takes parameters, it won’t give any value back when called and the result will be undefined.
45

5-
function multiply(a, b) {
6-
console.log(a * b);
7-
}
86

9-
console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
7+
//function multiply(a, b) {
8+
//console.log(a * b);
9+
//}
10+
11+
// console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
1012

1113
// =============> write your explanation here : /* The function multiply does not return any value, it only logs the result to the console. It returns undefined. To fix this, we need to add a return statement in the multiply function. */
1214

0 commit comments

Comments
 (0)