JSFiddle - React, Tailwind, and code Playground

by Plippie Plop

HTML

<ul class="one"></ul>
<ul class="two"><li>One</li></ul>
<ul class="three"><li>One</li><li>Two</li></ul>

<div class="test">

</div>

JavaScript

var tst = $('test');

var ul1 = $('.one');
var ul2 = $('.two');
var ul3 = $('.three');

tst.append(ul1.find('li').length+'<br>');
tst.append(ul2.find('li').length+'<br>');

console.log("one:");
console.log(ul1.find('li:first-child').length);
console.log("two:");
console.log(ul3[0].[0]);
console.log("three:");
console.log(ul3.find('li:last-child').index());