JSFiddle - React, Tailwind, and code Playground
by Vatsal Pande
HTML
<script src="https://code.jquery.com/jquery-2.2.4.js"></script>
$("#careerStats table thead tr th");
<div id ="careerStats">
<table>
<thead>
<tr>
<th>First</th>
<th>Second</th>
<th>Third</th>
<th>Fourth</th>
</tr>
</thead>
</table>
</div>
JavaScript
table_headers = $("#careerStats table thead tr th");
let newHeader = headers.map(function(obj) {return(obj.textContent);});
console.log(newHeader);