File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 44// this function should square any number but instead we're going to get an error
55
66// =============> write your prediction of the error here
7- // You can't put a number value into an argument .
7+ // You can't put a number value into a parameter .
88function square ( 3 ) {
99 return num * num ;
1010}
1111
1212// =============> write the error message here
1313// SyntaxError: Unexpected number
1414// =============> explain this error message here
15- // It is not expecting a number to be in the function argument .
15+ // It is not expecting a number to be in the function parameter .
1616// Finally, correct the code to fix the problem
1717
1818// =============> write your new code here
1919function square ( num ) {
2020 return num * num ;
2121}
2222
23- console . log ( "square" , square ( 5 ) )
You can’t perform that action at this time.
0 commit comments