Skip to content

Commit 485314b

Browse files
authored
Document error message and explanation in 2.js
Added comments explaining the error and its correction.
1 parent 49deb35 commit 485314b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

  • Sprint-2/1-key-errors

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@ function square(3) {
1111

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

14+
// [ChunYanWong] Uncaught SyntaxError SyntaxError: Unexpected number
15+
1416
// =============> explain this error message here
1517

18+
// [ChunYanWong] number 3 cannot be parameter
19+
1620
// Finally, correct the code to fix the problem
1721

1822
// =============> write your new code here
1923

24+
// [ChunYanWong] function square(num) {
25+
// ...
26+
2027

0 commit comments

Comments
 (0)