You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function randomColor() {
let num = [
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"a",
"b",
"c",
"d",
"e",
];
let color = "#";
for (let i = 0; i < 6; i++) {
let x = Math.floor(Math.random() * 15);
console.log(x);
color += num[x];
}
return color;
}
第894天 写一个方法,生成一个随机颜色字符串,合法的颜色为 #000000-#FFFFFF
3+1官网
我也要出题
The text was updated successfully, but these errors were encountered: