js length of int code example Example: javascript integer length var num = 1024, str = num.toString(), len = str.length; console.log(len);