You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// =============> write your prediction here: There is a semi column on line 5 after the return which separates it from line 6. We don't know what we are returning.
3
3
4
-
functionsum(a,b){
5
-
return;
6
-
a+b;
7
-
}
4
+
// function sum(a, b) {
5
+
// return;
6
+
// a + b;
7
+
// }
8
8
9
-
console.log(`The sum of 10 and 32 is ${sum(10,32)}`);
9
+
// console.log(`The sum of 10 and 32 is ${sum(10, 32)}`);
10
10
11
-
// =============> write your explanation here
11
+
// =============> write your explanation here: SInce we don't know what we are returning, we will get an undefined value for the function.
12
12
// Finally, correct the code to fix the problem
13
13
// =============> write your new code here
14
+
functionsum(a,b){
15
+
returna+b;
16
+
}
17
+
18
+
console.log(`The sum of 10 and 32 is ${sum(10,32)}`);
0 commit comments