Skip to content

Commit 89569c8

Browse files
author
Enice-Codes
committed
Remove Sprint-2 file from Sprint-1 PR
1 parent 6e2c969 commit 89569c8

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

  • Sprint-2/1-key-errors

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,20 @@
11

22
// Predict and explain first BEFORE you run any code...
3-
// i predict that the code will fail because js expects a variable name ,not a number and 3 is a number.
43

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

76
// =============> write your prediction of the error here
8-
// Uncaught SyntaxError: Unexpected number
97

108
function square(3) {
119
return num * num;
1210
}
1311

1412
// =============> write the error message here
15-
//Uncaught SyntaxError: Unexpected number
1613

1714
// =============> explain this error message here
18-
// function parameters must be identifiers (variable names) such num ,x numbers can not be used like variable names
19-
// and so the engine will be unable to read the code and cause synx errorS
2015

21-
// Finall correct the code to fix the problem
16+
// Finally, correct the code to fix the problem
2217

2318
// =============> write your new code here
24-
function square (num){
25-
return num*null;
26-
}
19+
2720

0 commit comments

Comments
 (0)