Find the last digit in 39999.

I can not figure this one out. Can some one explain this

The last digit (which in this case is the fifth digit) is 9. The second, third and fourth digits are also 9