Skip to content

Commit ddfd57a

Browse files
added another reason as to whats wrong with the code
1 parent 3bc7d4f commit ddfd57a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

  • Sprint-2/2-mandatory-debug

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
1111

1212
// =============> write your explanation here
1313
// The function sum defines that a+b must be added together but before that return is used with no argument defined and we we exit the function immediately when it is called on line 10 the function returns to the string undefined.
14+
// Another issue is that a + b is placed after return so that line is unreachable and will never run.
1415

1516
// Finally, correct the code to fix the problem
1617
// =============> write your new code here

0 commit comments

Comments
 (0)