Skip to content

Commit a72a8d2

Browse files
committed
explained the function
1 parent 8e51dec commit a72a8d2

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

  • Sprint-2/2-mandatory-debug

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
// Predict and explain first...
22
// =============> write your prediction here
3+
// the function will sum the given parameters
34

45
function sum(a, b) {
5-
return;
6-
a + b;
6+
return a + b;
77
}
88

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

1111
// =============> write your explanation here
12+
// unable to return nothing - the statement is not given - has to be in the same line with the return
1213
// Finally, correct the code to fix the problem
14+
1315
// =============> write your new code here
16+
// function sum(a, b) {
17+
//return a + b;
18+
//}

0 commit comments

Comments
 (0)