JSFiddle - React, Tailwind, and code Playground

by kristaps_petersons

HTML

<textarea id="txtarea"></textarea>
<button onClick="printLength">Log text</button>

JavaScript

function printLength() {
    text = $('#txtarea').val()
    console.log("JS method text '#{text}' length: #{text.length}")
}