Trying to build an HTML list

You can also take advantage of Observable template literal html`` to compose your element like this

viewof test = {
  const lis = [];
  for (let i = 0; i < 7; i++) {
    lis.push(html`<li> Index: ${i} </li>`);
  }
  const element = html`<h1>Test</h1><ul>${lis}</ul>`;

  return element;
}

You can learn more about this

and

3 Likes