Write a function named getLastDigit that takes one number and returns its last digit.
Use the provided template.
Write a function named getLastDigit that takes one number and returns its last digit.
Use the provided template.
Sample Input 1:
12345Sample Output 1:
5Sample Input 2:
-512Sample Output 2:
2Create a free account to access the full topic