Skip to content

Commit 9a0ba04

Browse files
Update comments to explain syntax error in 2.js
Clarified explanation of the syntax error in the comments.
1 parent a1ecaa4 commit 9a0ba04

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • Sprint-3/1-key-errors

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
// =============> explain this error message here
1616
/* The function was givin a number as its perameter where in JS only allows varaible names and usnig a number causes a SyntaxError
17-
Also, the function was returning num*num where num is undefined causing a syntax error
17+
Also, the function was returning num*num where num is undefined causing a SyntaxError
1818
*/
1919

2020
// Finally, correct the code to fix the problem
@@ -25,4 +25,4 @@ function square(num) {
2525
return num * num;
2626
}
2727

28-
console.log(square(25));
28+
console.log(square(25));

0 commit comments

Comments
 (0)