    <!DOCTYPE html>
    <html>
    <head>
      <meta charset="UTF-8">
      <title>무작위로 배경색 바꾸기</title>
      <link rel="stylesheet" href="style_js.css">
    <body>
      <script>
        const letters = "0123456789ABCDEF";
        let color = "#";
        let count = 1;
        let intervalID = setInterval(changeColor, 1000);

        function changeColor() {
          if (++count > 25)
            clearInterval(intervalID);
          for (let k = 0; k < 6; k++)
            color += letters[Math.floor(Math.random()*16)];
          document.write("<div style='background-color:"
            + color + "'>" + color + "</div>");
          color = "#";                // 16진수 문자열 초기화
        }
      </script>
    </body>
    </html>