js .length integer code example
Example 1: javascript number length
var num = 1234
number.toString().length; // 4
Example 2: javascript integer length
var num = 1024,
str = num.toString(),
len = str.length;
console.log(len);
var num = 1234
number.toString().length; // 4
var num = 1024,
str = num.toString(),
len = str.length;
console.log(len);