How can I find the length of a number?

var x = 1234567;

x.toString().length;

This process will also work forFloat Number and for Exponential number also.

Leave a Comment