2021-08-17 向上取整十,整百,整千,整万

     function ceilNumber(number) {
        let bite = 0;
        if (number < 10) {
          return 10;
        }
        while (number >= 10) {
          number /= 10;
          bite += 1;
        }
        return Math.ceil(number) * Math.pow(10, bite);
      }

你可能感兴趣的:(2021-08-17 向上取整十,整百,整千,整万)