File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11
22// Predict and explain first BEFORE you run any code...
3+ //function is there to calculate the square parameter
34
45// this function should square any number but instead we're going to get an error
56
@@ -10,11 +11,18 @@ function square(3) {
1011}
1112
1213// =============> write the error message here
14+ // we are returning the num - but the parameter already given as an argument not a parameter 3 -
15+ // for the function to recognize num we would need to give this to the function as a parameter
1316
1417// =============> explain this error message here
18+ //unexpected number - the function has an unexpected argument
1519
1620// Finally, correct the code to fix the problem
1721
1822// =============> write your new code here
23+ //function square(num) {
24+ //return num * num;
25+ //}
26+ //square(3)
1927
2028
You can’t perform that action at this time.
0 commit comments