I want to assign a variable to $("#investigaciones)'s selector:
$("#investigaciones em:last-child").remove()
let investigaciones = $("#investigaciones);
Can't find a way to make the last-child work:
investigaciones.lastChild('em:last-child').remove
Use the native JavaScript querySelector() method:
let investigaciones = document.querySelector("#investigaciones");
investigaciones.querySelector("em:last-child").remove()
<div id="investigaciones">
<em>
1
</em>
<em>
2
</em>
</div>