My new programm for Choose colors! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
27th Jun 2017, 3:03 PM
iQuzy
iQuzy - avatar
3 Answers
+ 3
um hello nice code but if u remove the setInterval() and put an oninput attribute to <input type="color"> its gonna be better and less spaghetti so just rectify it to be <input type="color" oninput="col()"> and remove the setInterval() btw u dont need semicolons in javascript
27th Jun 2017, 3:07 PM
David Sebastian Keshvi Illiakis
David Sebastian Keshvi Illiakis - avatar
+ 3
thanks @cheeze and @Netkos Ent 👍😀😃 :)
27th Jun 2017, 4:02 PM
iQuzy
iQuzy - avatar
0
Agreed with Cheeze. I would put it on the input so it updates as you change the input, rather than having to wait and use up unnecessary resources in the process. Although semicolons aren't necessary, still good practice. ;)
27th Jun 2017, 3:20 PM
AgentSmith