get num digits code example Example: get number of digits in a number function getlength(number) { return number.toString().length; }