I've been learning Javascript for about 2 weeks and finally built something on my own that works. Can r/javascript show me a shorter way to achieve the same result?

05/02/2018



var colorHex = [‘a’,’a’,’b’,’c’,’d’,’e’,’f’,’0′,’1′,’2′,’3′,’4′,’5′,’6′,’7′,’8′,’9′]; var randomColor = []; function getRandomColor(){ do{ randomNum = Math.round(Math.random()*17); randomNum = randomNum.toString().toUpperCase(); randomColor.push(colorHex[rand..

قالب وردپرس