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-3/2-mandatory-debug/2.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -46,4 +46,4 @@ console.log(`The last digit of 806 is ${getLastDigit(806)}`);
46
46
// Answer below:
47
47
48
48
// The global constant variable outside the function has affected the code and caused it to always reference the last number of the global variable
49
-
// To fix this, the global variable will be removed from code and the function getLastDigit should take the variable name "num" assigned to the global variable.
49
+
// To fix this, getLastDigit needed its own parameter, so num comes from whatever you pass in
0 commit comments