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
// Predict and explain first BEFORE you run any code...
3
2
4
3
// this function should square any number but instead we're going to get an error
5
4
6
5
// =============> write your prediction of the error here
7
-
//I predict the funciton will throw a SyntaxEror as the perametters sould be valid variables like names or identifiers with upholding to the variable naming convention and in this case a number found
6
+
//I predict the funciton will throw a SyntaxEror as the perametters sould be valid variables like names or identifiers with upholding to the variable naming convention and in this case a number found
8
7
9
8
// function square(3) {
10
9
// return num * num;
11
10
// }
12
11
13
12
// =============> write the error message here
14
-
//the Error is a syntax error: Unexpected number
13
+
//the Error is a syntax error: Unexpected number
15
14
16
15
// =============> explain this error message here
17
16
/* The function was givin a number as its perameter where in JS only allows varaible names and usnig a number causes a SyntaxError
18
-
Also, the function was returning num*num where num is undefined causing a ReferenceError
17
+
Also, the function was returning num*num where num is undefined causing a syntax error
0 commit comments