Skip to content

Commit 9bca312

Browse files
committed
fixed 1-key errors
1 parent ca40d0c commit 9bca312

File tree

1 file changed

+2
-3
lines changed
  • Sprint-2/1-key-errors

1 file changed

+2
-3
lines changed

Sprint-2/1-key-errors/2.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@
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.
88
function 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
1919
function square(num) {
2020
return num * num;
2121
}
2222

23-
console.log("square",square(5))

0 commit comments

Comments
 (0)