1
I am working with javascript for a short time, and I see people commenting whenever innerHTML is a bad practice.
I agree that it is not a very beautiful code to write htmls by the js themselves, but I have a great habit of using innerHTML to clear a table or list.
The question is, if I’m not going to use innerHTML to clear lists, I need to go through all the nodes I want to delete with a while, and go deleting one by one. In addition to the code getting bigger, I wanted to know in a matter of performance which is more advisable, the pros and cons of both. And if there’s any other way.
some solution for pure js ?
– Andre Lima