Skip to content

Commit 0c19af2

Browse files
committed
fix debug 0
1 parent 4c2400a commit 0c19af2

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

  • Sprint-3/2-mandatory-debug

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

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

3-
// =============> write your prediction here
3+
// =============> The function instructions will work but because there is no return statement it will be undefined
44

55
function multiply(a, b) {
66
console.log(a * b);
77
}
88

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

11-
// =============> write your explanation here
11+
// =============> Because a return statement will return that value back to the code, it will send it back to who called the function this does not mean the human will see it in the log, console.log is used to show the result to the reader.
1212

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

0 commit comments

Comments
 (0)