Skip to content

Commit a0fe166

Browse files
committed
Clarify explanation of getLastDigit function
1 parent 7bba0f0 commit a0fe166

File tree

1 file changed

+2
-2
lines changed
  • Sprint-2/2-mandatory-debug

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ console.log(`The last digit of 806 is ${getLastDigit(806)}`);
2323

2424
// Explain why the output is the way it is
2525
// =============> write your explanation here
26-
// The function `getLastDigit` is not taking any arguments, so it always returns the last digit which is 103.
26+
// The function `getLastDigit` is not taking any arguments, so it always returns the last digit of 103 which is '3'.
2727

2828
// Finally, correct the code to fix the problem
2929
// =============> write your new code here
@@ -38,6 +38,6 @@ console.log(`The last digit of 806 is ${getLastDigit(806)}`);
3838
// This program should tell the user the last digit of each number.
3939
// Explain why getLastDigit is not working properly - correct the problem
4040

41-
// The function `getLastDigit` is not working properly because it was using `num`,
41+
// The function `getLastDigit` is not working properly because it was using `num`,
4242
// instead of the parameter passed to the function. By changing the function to accept a parameter `num`,
4343
// it now correctly returns the last digit of the number passed to it..

0 commit comments

Comments
 (0)