Skip to content

Commit dcbef87

Browse files
committed
Reformat the explanation to make it more clear
1 parent 92fef89 commit dcbef87

File tree

1 file changed

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

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
*
4141
* The function getLastDigit() is not working properly because:
4242
* It's ignoring the parameter: The function is defined to take a parameter, but when calling the function it's using the global variable num (which is set to 103) instead of the parameter passed to it.
43-
* No parameters in function definition: The function is defined as function getLastDigit() without any parameters, so when we call getLastDigit(42), the 42 is ignored.
43+
* There is no parameters in function definition.
44+
* The function is defined as function getLastDigit() without any parameters, so when we call getLastDigit(42), the 42 is ignored.
4445
* Fixed value: The function always returns the last digit of 103 (which is "3"), regardless of what number is passed to it.
4546
* That's why all three console logs show "3" - they're all getting the last digit of 103, not the numbers 42, 105, and 806 passed.
4647
*/

0 commit comments

Comments
 (0)