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
Here is another one using .slice():
var test = 2354.55; var lastDigit = test.toString().slice(-1); //OR //var lastDigit = (test + '').slice(-1); alert(lastDigit);