File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 55
66// =============> write your prediction of the error here
77
8+ // The function will not execute because of the undefined variable `num` and the parameter `3`,
9+ // which is not allowed to be defined with just numbers. There must be letters to define a variable
10+ // but can begins with numbers.
11+
812function square ( 3 ) {
913 return num * num ;
1014}
1115
1216// =============> write the error message here
1317
18+ // SyntaxError: Unexpected number
19+
1420// =============> explain this error message here
1521
22+ // It's referring to the function parameter `3`
23+
1624// Finally, correct the code to fix the problem
1725
1826// =============> write your new code here
1927
20-
28+ function squared ( value ) {
29+ return value * value ;
30+ }
You can’t perform that action at this time.
0 commit comments