Skip to content

Commit 6700cbc

Browse files
completed error 2
1 parent 4f07ca0 commit 6700cbc

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

  • Sprint-3/1-key-errors

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
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+
// =============> num is not defied
77

8-
function square(3) {
8+
/*function square(3) {
99
return num * num;
10-
}
10+
}*/
1111

1212
// =============> write the error message here
1313

@@ -16,5 +16,8 @@ function square(3) {
1616
// Finally, correct the code to fix the problem
1717

1818
// =============> write your new code here
19+
function square(num) {
20+
return num * num;
21+
}
1922

2023

0 commit comments

Comments
 (0)