SOURCE

function getUUid(size) {
  var size = size;
  var soup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
  var length = soup.length;
  var arr = [];
  for (let i = 0; i < size; i++) {
    arr[i] = soup.charAt(Math.random() * length)
  }
  return arr.join("")
}

console.log(getUUid(5))
console 命令行工具 X clear

                    
>
console