Skip to content

Commit 9256617

Browse files
committed
Revert "Update 2.js"
This reverts commit bbdcc95.
1 parent a68f546 commit 9256617

File tree

1 file changed

+10
-4
lines changed
  • Sprint-2/1-key-errors

1 file changed

+10
-4
lines changed

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

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,22 @@
33

44
// this function should square any number but instead we're going to get an error
55

6-
// =============> write your prediction of the error here
6+
// =============> identifier not declared (unknown)
77

88
function square(3) {
99
return num * num;
1010
}
1111

12-
// =============> write the error message here
12+
// =============> Unexpected number
1313

14-
// =============> explain this error message here
14+
// =============> the parameter shouldn't be given an argument in the function definition
1515

1616
// Finally, correct the code to fix the problem
1717

18-
// =============> write your new code here
18+
// =============> my new code
19+
function square(num) {
20+
return num * num;
21+
}
22+
console.log(square(3));
23+
24+

0 commit comments

Comments
 (0)