Skip to content

Commit 9650964

Browse files
committed
complete ex 0.js
1 parent 001939b commit 9650964

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

  • Sprint-3/2-mandatory-debug

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

Lines changed: 9 additions & 5 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+
// =============> I couldn't predict until I run the code
44

5-
function multiply(a, b) {
5+
/*function multiply(a, b) {
66
console.log(a * b);
77
}
88
9-
console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);
10-
11-
// =============> write your explanation here
9+
console.log(`The result of multiplying 10 and 32 is ${multiply(10, 32)}`);*/
1210

11+
/* =============> The Terminal gives an answer of 320 but also says "The result of multiplying 10 and 32 is undefined"
12+
which makes me think that the function has no return so it gives back undefined.*/
1313
// Finally, correct the code to fix the problem
1414
// =============> write your new code here
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)