code: function generate(length) {
      var len = length - 1;
      var ary = new Array(len);
      for (var i = 0; i < len; i++) {
        ary.push(Math.floor(Math.random() * 10));
      }
      var num = ary.join('');
      return num + '' + checkSum(num);
    }
docs: create generate code
  
  @param {number} length generage
  @return {string} generaged digits value