Skip to content

Commit bcf8265

Browse files
committed
Refactor getLastDigit function to accept a parameter and add new password checker functionality
1 parent 9fdc5ce commit bcf8265

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • Sprint-3/2-mandatory-debug

‎Sprint-3/2-mandatory-debug/2.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ console.log(`The last digit of 806 is ${getLastDigit(806)}`);
4646
// Answer below:
4747

4848
// 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

Comments
 (0)