contents().last().remove()

by Akram kamal

HTML

<div>
    <p>A sample text</p>Remove this one</div>

JavaScript

$(function () {

    $("div").contents().last().remove()

})