I have a javascript loop and I want to display my html code inside it, like if I use `echo` in PHP, the code prints there. This is what I have tried so far:

```
<div class="colorpick">
    <script language="javascript">
        for (var i = 0; i < 2; i++) {
        domument.write('<div class="pick" style="background-color:'+ list[i] + '" onclick="hello(this.style.backgroundColor);"></div>');
        }
    </script>
</div>

```