I am appending a div and its children in HTML dynamically as below -
var x = 25;
document.getElementById("items").innerHTML +=
`<div class="details">
<p>Name</p>
<p></p>
</div>`
Requirement : In the second p tag I want to append the value of variable x . How do I do that ? Need help with the syntax.
Thanks!!