📌  相关文章
📜  生成随机十六进制代码 - Javascript 代码示例

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

代码示例2
const randomHex = () => `#${Math.floor(Math.random() * 0xffffff).toString(16).padEnd(6, "0")}`;

console.log(randomHex());
// Result: #92b008