Answer for Test skills Loop 1

I think I did it right, but would still appreciate any insight.

Regads

Hi @od507 and welcome to the community :wave:

Congratulations, your code works as expected! :tada:

You can even simplify your textContent to just one line:

items.textContent = myArray[j];

Reasons:

  • It is initially empty. No need for +=.
  • <li>s are block elements. They break the line automatically. Also, \n don’t work in HTML directly. They get converted to just a space character.

I hope that helps. :slightly_smiling_face:
Michael