Skip to content

Commit ffcaf92

Browse files
Put return instead of console.log
1 parent e09336a commit ffcaf92

1 file changed

Lines changed: 14 additions & 6 deletions

File tree

  • Sprint-3/2-mandatory-debug

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22

33
// =============> write your prediction here : In step six we need to write return type and output become 320.
44

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

9-
console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
9+
// // console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
1010

11-
// =============> write your explanation here
11+
// =============> write your explanation
12+
// There should be return but code is perfectly run without changing the return type instead of console.log in line 6.
1213

13-
// Finally, correct the code to fix the problem
14+
// Finally, correct the code to fix the problem
15+
// In the section there has no output error but console is for getting output in print but in function there should be a return type so that after correcting this code
16+
// the output become The result of multiplying 10 and 32 is 320.
1417
// =============> write your new code here
18+
function multiply(a, b) {
19+
return a * b;
20+
}
21+
22+
console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);

0 commit comments

Comments
 (0)