Assessment wanted for Loops 1 skill test A

I need some help on this assessment. I can’t get the append method argument to be interpreted as html like

  • 1
  • 2
. I can’t find any explanation related to this in the previous tutorial. The links are :
Assessment Page and Codepen page.

Thank you in advance for your help !

1 Like

Hi @TheRealSuperhuman

I think you might have had the same problem as osbond. I gave an answer to Osbond.
Have a look and see if it helps. If not appreciate if you could share your code and answer where you are getting the difficulty.

1 Like

I don’t understand it, I’ve shared my codepen link in the question.

:sunglasses: thanks for sharing

Your for loop is perfect. It captures all the array items.
The issue is that a ‘ul’ is an undifined list. You still need to create an ‘li’ element. You can see this in the MDN link on Unordered lists. So in the loop

  1. create a new variable and asign an ‘li’ element to it.
  2. then add the text of the myArray item to this new variable.
  3. then append this variable to the list that was created above the code area.

To get a better feel on how to add new elements look at the section “Creating and placing New Nodes” in the Manipulating documents section.

Hope that helps.

Thank you, I think it work correctly now