📜  随机十六进制字符 js - Javascript 代码示例

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

代码示例1
const genRanHex = size => [...Array(size)].map(() => Math.floor(Math.random() * 16).toString(16)).join('');

console.log(genRanHex(6));
console.log(genRanHex(12));
console.log(genRanHex(3));