I am trying to create a random color generator is there any way to shorten this code and convert into es6 arrow function? Thank you
let html = "";
let rgbColor;
function randomColors(red, green, blue) {
for (let i = 1; i <= 10; i++) {
red = Math.floor(Math.random() * 256);
green = Math.floor(Math.random() * 256);
blue = Math.floor(Math.random() * 256);
rgbColor = `rgb(${red},${green},${blue})`;
html += `<div style="background-color:${rgbColor}"></div>`;
}
document.write(html);
}
randomColors()