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
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,17 +4,24 @@
4
4
// this function should square any number but instead we're going to get an error
5
5
6
6
// =============> write your prediction of the error here
7
+
// I guess an error will be thrown because a number can not be a parameter.
7
8
8
9
functionsquare(3){
9
10
returnnum*num;
10
11
}
11
-
12
12
// =============> write the error message here
13
+
//SyntaxError: Unexpected number
13
14
14
15
// =============> explain this error message here
16
+
// It does not know where the 3 came from. So instead of 3 it was supposed to be num.return num * num; does not work because num is not in the parameter.
0 commit comments