I want to add an li with some divs and paragraphs to my ul every time I run a certain function in javascript so I have this code in html:
<body>
<ul id="ul">
<li class="li">
<div>
<p>1</p>
<p>2</p>
</div>
</li>
</ul>
</body>
And I wanna add this code to the end of the unordered list:
<li>
<div class="li">
<p>3</p>
<p>4</p>
</div>
</li>
I want a function in javascript that can do that in an easy way