Skip to content

Commit 1e55d56

Browse files
authored
Update 1.js
1 parent 9b67723 commit 1e55d56

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • Sprint-2/2-mandatory-debug

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
// I predict it will show a undefined error
44

55
function sum(a, b) {
6-
return;
7-
a + b;
6+
return a + b;
87
}
98

10-
console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
9+
console.log(`The sum of 10 and 32 is ${sum(a + b)}`);
1110

1211
// =============> write your explanation here
1312
// The problem was the semicolon after return, which made the function stop before adding the numbers

0 commit comments

Comments
 (0)