JSFiddle - React, Tailwind, and code Playground

HTML

<span> </span>

JavaScript

console.log("'" + $('span').text() + "'");