You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sprint-2/1-key-errors/1.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,7 @@ console.log(decimalNumber);
17
17
// Since the parameter and variable have the same name, decimalNumber, we will get an error as we can not declare a
18
18
// variable of the same name with in the functions local scope. In addition to that setting decimalNumber to 0.5 means
19
19
// 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.
0 commit comments