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 0a7da43 commit 45b6a43Copy full SHA for 45b6a43
Sprint-2/1-key-errors/2.js
@@ -3,18 +3,20 @@
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
19
-
20
+// =============> my new code
+function square(num) {
+ return num * num;
21
+}
22
+console.log(square(3));
0 commit comments