JSFiddle - React, Tailwind, and code Playground
by AndyE
HTML
<p>The quick brown fox jumps over the
lazy dog</p>
<button>innerText</button><button>textContent</button>
JavaScript
$("button").click(function () {
alert($("p")[0][this.textContent]);
});