JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<!-- Element Selectors -->
<p>Stackoverflow to help in understanding errors </p>

<hr/>

<!-- ID Selectors -->
<div id="selectMe">I am inner content of Div.</div> 

<hr/>
<!-- Class Selector -->
<span class="demoClass"> Demo JQuery Class Selectors </span>
<hr/>
<!-- All element -->

<p> This is p Tag </p>
<div> This is div Tag</div>
<span> This is span Tag</span>
<hr/>

<!-- Other selectors -->
<ul>
  <li>One</li>
  <li>Two</li>
  <li>Three</li>
  <li>Four</li>
</ul>

<table>
   <th>First Row</th>
   <th>Second Row</th>
   <tr>
      <td>0</td>
      <td>1</td>
   </tr>
   <tr>
      <td>2</td>
      <td>3</td>
   </tr>
   <tr>
      <td>4</td>
      <td>5</td>
   </tr>
   <tr>
      <td>6</td>
      <td>7</td>
   </tr>
</table>

CSS

table,th,td{
  border:1px solid #000;
}

JavaScript

$(document).ready(function(){
  console.log($("p"));  // element selector
  console.log($("#selectMe"));  // ID selector
  console.log($(".demoClass"));  // class selector
  console.log($("*")); // All selector
  
  /******************************/
  //1. ":first" return text of first child of unordered list ul
  console.log($("ul li:first").html());
  
  //2. ":last" return text of last child of unordered list ul
  console.log($("ul li:last").html());
  
  //3. ":even" change background of all even element
  $("tr td:even").css("background","green");
  
  //4. ":odd" change background of all odd element
  $("tr td:odd").css("background","red");
  
})