I want to make a text box all in javascript no html (so can use it in the console.log), update background color with setInterval. How can it be done?
This is what I got so far, but does not work.
var x = document.createElement("INPUT");
x.setAttribute("type", "text");
x.setAttribute("value", color);
document.body.appendChild(x);
var color;
setInterval(function(){if (x.setAttribute("value",color)===color{document.body.style.backgroundColor=color};},100);
setInterval?