My aim in the study is to generate random colors and apply them to the body background, but it doesn't work, why is it wrong?
enter image description here what is the problem here function or addeventlistener? ` const button = document.querySelector("button"); // Generate random color value and return it. EX 8a6cff const getRandomColor = () => Math.floor(Math.random() * 0xffffff).toString(16); const generateGradient = () => { // Get random two colors for gradient const color1 = getRandomColor(); const color2 =… Read More My aim in the study is to generate random colors and apply them to the body background, but it doesn't work, why is it wrong?