+ 1

People help please-how to make the function so that when you click on a red square, a random color would appear

https://code.sololearn.com/WYVv8jYuF2iu/?ref=app

22nd May 2018, 11:17 AM
oTARANo
oTARANo - avatar
2 Respostas
+ 10
Colors are 3 bytes var num = Math.floor(Math.random() * (0xffffff + 1)); var hexColor = "#" + num.toString(16)
22nd May 2018, 1:07 PM
Toni Isotalo
Toni Isotalo - avatar
- 1
no works
24th May 2018, 7:19 AM
oTARANo
oTARANo - avatar