check length of value js code example Example: check length of number javascript var number = 773; number.toString().length;