JSFiddle - React, Tailwind, and code Playground

by darcyclarke

HTML

<textarea>foo</textarea>

<input type="text" value="foo">

JavaScript

// Change value of textarea
$("textarea").val("bar");

// Check textarea's text
console.log($("textarea").text()); // foo >_<

// Change value of input
$("input").val("bar");

// Check input text
console.log($("input").text()); // foo >_<