Skip to content

Commit ca2b713

Browse files
committed
0.js updated template
1 parent 6a28411 commit ca2b713

File tree

1 file changed

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

1 file changed

+7
-0
lines changed

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

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

33
// =============> write your prediction here
4+
// I predict there will be error because instead of console.log we should have used return.
45

56
function multiply(a, b) {
67
console.log(a * b);
@@ -9,6 +10,12 @@ function multiply(a, b) {
910
console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
1011

1112
// =============> write your explanation here
13+
// The same as I predicted.
1214

1315
// Finally, correct the code to fix the problem
1416
// =============> write your new code here
17+
function multiply(a, b) {
18+
return(a * b);
19+
}
20+
21+
console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);

0 commit comments

Comments
 (0)