How can I find the length of a number?
javascript, jquery
Solution
var x = 1234567;
x.toString().length;
This process will also work for`Float Number` and for `Exponential number` also.
Problem
I'm looking to get the length of a number in JavaScript or jQuery? I've tried `value.length` without any success, do I need to convert this to a string first?