Skip to content

Commit f95f159

Browse files
fixing exercise 2.js
1 parent 5a1f129 commit f95f159

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

  • Sprint-3/1-key-errors

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
// this function should square any number but instead we're going to get an error
44

55
// =============> write your prediction of the error here : The funcation parameter 3 this will cause an error to be thrown because the parameter is not a valid identifier.
6-
function square(3) {
7-
return num * num;
6+
// function square(3) {
7+
// return num * num;
88

9-
}
9+
// }
1010

1111
// =============> write the error message here: SyntaxError: Unexpected number
1212

@@ -15,7 +15,7 @@ function square(3) {
1515
// Finally, correct the code to fix the problem
1616

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

0 commit comments

Comments
 (0)