We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca2b713 commit 468a49fCopy full SHA for 468a49f
Sprint-2/2-mandatory-debug/1.js
@@ -1,5 +1,6 @@
1
// Predict and explain first...
2
// =============> write your prediction here
3
+// there will be an error because return should not have semicolon which is the end of the declaration and a+b should be with it together.
4
5
function sum(a, b) {
6
return;
@@ -9,5 +10,11 @@ function sum(a, b) {
9
10
console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
11
12
// =============> write your explanation here
13
+// it is undefined because it stopped reading at return;
14
// Finally, correct the code to fix the problem
15
// =============> write your new code here
16
+function sum(a, b) {
17
+ return a + b;
18
+}
19
+
20
+console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
0 commit comments