How to select last child element in jQuery?

Can anyone tell me how to select the last element in jQuery? I have a list of

tags. I want to select the last one. How can I do that?

<div class="article>
    <p>Some random text 1</p>
    <p>Some random text 2</p>
    <p>Some random text 3</p>
    <p>Some random text 4</p>
    <p>Some random text 5</p>
    <p>Some random text 6</p>

How do I select <p>Some random text 6</p> this line?

You have several choices, you can use any of the examples below.



$('.article p:last')


$('.article p:last-child');