I want get random HEX color. that is my code (JavaScript):
let colors = ['1','2','3','4','5','6','7','8','9','0','A','B','C','D','E','F'];
let random = colors[Math.floor(Math.random() * colors.length)];
console.log(`#${random}${random}${random}${random}${random}${random}`);
but it returns the same element whenever I call a variable (for exam. "#cccccc", "#999999"..).
Do I have to set the variable 6 times, or there is a shorter way?
any feedback will help me.(I am an absolute beginner with programming)