How to extract last(end) digit of the Number value using jquery. because i have to check the last digit of number is 0 or 5. so how to get last digit after decimal point
Just in one line.
const getLastDigit = num => +(num + '').slice(-1); console.log(getLastDigit(12345)) // Expect 5