File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ console.log(decimalNumber);
1717
1818// =============> write your explanation here
1919when 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 .
2122to 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
You can’t perform that action at this time.
0 commit comments