📌  相关文章
📜  如何在 js 中生成 6 个随机字母数字 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:06.292000             🧑  作者: Mango

代码示例1
let characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
let result = ''
let length = 10 // Customize the length here.
for (let i = length; i > 0; --i) result += characters[Math.round(Math.random() * (characters.length - 1))]
console.log(result)