Skip to content

Commit e0b2b1c

Browse files
committed
refactored code using prettier
1 parent 1472b08 commit e0b2b1c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • Sprint-3/2-mandatory-debug

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88

99
//console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
1010
//console output: The sum of 10 and 32 is undefined
11-
// The return statement was placed before the calculation the code on line 6 doesn't get executed as return ends the function on line 5. The function would need to return a+b in order for it to return the result.
12-
11+
//The return statement was placed before the calculation the code on line 6 doesn't get executed as return ends the function on line 5. The function would need to return a+b in order for it to return the result.
1312
//Finally, correct the code to fix the problem
1413

1514
function sum(a, b) {
16-
return a + b;
15+
return a + b;
1716
}
1817
console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);

0 commit comments

Comments
 (0)