Skip to content

Commit 86b563c

Browse files
fixed the explaination sentence
1 parent 9027d5d commit 86b563c

File tree

1 file changed

+2
-1
lines changed
  • Sprint-2/1-key-errors

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ console.log(decimalNumber);
1717

1818
// =============> write your explanation here
1919
when the program run it give a SyntaxError: Identifier 'decimalNumber' has already been declared. This is because the variable decimalNumber is declared twice in the function
20-
convertToPercentage, and inside the function with the constant varible it redeclared again also using the function name decimalNumber with the console.log function will give an error because the function name should be
20+
convertToPercentage.
21+
Also using the function name decimalNumber with the console.log function will give an error because the function name should be a prober name not a Number.
2122
to fix this error we can remove the const variable declaration of decimalNumber from the function and use the function name
2223
'ConvertToPercentage' to recall the function and pass the value of the decimalNumber.CSSStyleDeclaration
2324

0 commit comments

Comments
 (0)