I have a question about this (2 years later, sorry): can I append items that are on a array?
I want to render li elements with text from localStorage (it is a basic DOM exercise I'm planning) inside a ul, so I was planning on using an array as I do not know how many elements are going to be created.
Is there any way to do it?
Edit: I know editing DOM is costly, so I do not know if it is best to do something like:
I have a question about this (2 years later, sorry): can I append items that are on a array?
I want to render
li
elements with text fromlocalStorage
(it is a basic DOM exercise I'm planning) inside aul
, so I was planning on using an array as I do not know how many elements are going to be created.Is there any way to do it?
Edit: I know editing DOM is costly, so I do not know if it is best to do something like:
Would this be appropriate?