JSFiddle - React, Tailwind, and code Playground

by rwaldron

HTML

<div class="test">div1</div>

JavaScript

var $test = $('.test');


// expect all true
console.log( 
    $test.eq(0).length === 1,   
    $test.eq(1).length === 0,
    $test.eq(-1).length === 1,
    $test.eq(-2).length === 0
);