I'm an absolute JS beginner. I would appreciate your help for the following: I have the following HTML code. How can I change the order of li-s in a list when I press a button with JS? i.e.: Item1 should become Item2 and so on. I think it's possible to do this with "for(){}", I just don't know exactly how..
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ul>
<button>Click Me</button>