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
Copy file name to clipboardExpand all lines: Sprint-2/1-key-errors/2.js
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,18 +3,21 @@
3
3
4
4
// this function should square any number but instead we're going to get an error
5
5
6
-
// =============> write your prediction of the error here
6
+
// =============> we should put num in the input of the function, instead of 3
7
7
8
8
functionsquare(3){
9
9
returnnum*num;
10
10
}
11
11
12
-
// =============> write the error message here
12
+
// =============>
13
+
//Uncaught SyntaxError SyntaxError: Unexpected number
13
14
14
15
// =============> explain this error message here
15
-
16
+
//3 is unexpected. when we define a function we want to give it parameter(s), not a specific number. it is when the function is called that we want to give it specific values to pass in.
0 commit comments