get the length of number in javascript code example Example: javascript length of number x.toString().length // x is a number