Skip to content

Commit 85519a8

Browse files
commented on error on line 12
1 parent dd44041 commit 85519a8

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • Sprint-2/1-key-errors

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ console.log(decimalNumber);
1717
// Since the parameter and variable have the same name, decimalNumber, we will get an error as we can not declare a
1818
// variable of the same name with in the functions local scope. In addition to that setting decimalNumber to 0.5 means
1919
// the function will always return 50% no matter what number is passed into it.
20-
21-
// Finally, correct the code to fix the problem
20+
// Line 12 tries to access decimalNumber outside the function but decimalNumber only exists as a variable inside the function's local scope so this causes an error.
2221
// =============> write your new code here
2322

2423
function convertToPercentage(decimalNumber) {

0 commit comments

Comments
 (0)