Problem in selecting li

Problem in selecting li

<ul>
<li><a href= "#" >Books </a>
<ul>
<li><a href= "#" >New Books </a></li>
<li><a href= "#" >Old Books (2017) </a></li>
</ul>
</li>
</ul>


When I am trying to access 'Books' . Jquery is also giving me 'New Books' and 'Old Books (2017)'

js code is..

var li = $( "ul :last-child").find( 'a').text();
alert(li);

Please help...