0
Question is in the description. Please answer the question.
Imagine, you have one div element in your html doc. And inside the div there are two more div elements. In other words there are one parent and two children. And I want to swap children elements. To do this I used inserBefore. The function works fine, it swaped their places. I think there must be three elements inside parent, but in fact two elements are still present. WHY???
2 Answers
+ 3
How do you know they were swapped? Thereâs two elements because insertBefore didnât work and probably threw an error.
0
Because each child has its own color. I knew by their places or orders inside the parent.