Instructions:
Define a function that takes in two non-negative integers a and b and returns the last decimal digit of ab. Note that a and b may be very large!
For example, the last decimal digit of 97 is 9, since 97= 47829699.
The last decimal digit of (2200)2300 , which has over 1092 decimal digits, is 6. Also, please take 00 to be 1.
You may assume that the input will always be valid.
Output / Examples:
lastDigit("4", "1") // returns 4
lastDigit("4", "2") // returns 6
lastDigit("9", "7") // returns 9
lastDigit("10","10000000000") // returns 0