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 a68f546 commit 9256617Copy full SHA for 9256617
Sprint-2/1-key-errors/2.js
@@ -3,16 +3,22 @@
3
4
// this function should square any number but instead we're going to get an error
5
6
-// =============> write your prediction of the error here
+// =============> identifier not declared (unknown)
7
8
function square(3) {
9
return num * num;
10
}
11
12
-// =============> write the error message here
+// =============> Unexpected number
13
14
-// =============> explain this error message here
+// =============> the parameter shouldn't be given an argument in the function definition
15
16
// Finally, correct the code to fix the problem
17
18
-// =============> write your new code here
+// =============> my new code
19
+function square(num) {
20
+ return num * num;
21
+}
22
+console.log(square(3));
23
+
24
0 commit comments