JSFiddle - React, Tailwind, and code Playground

by Rick Hedin

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <textarea id="ta">
    </textarea>
    <input id="i">
</body>
</html>

JavaScript

var ta = document.getElementById('ta')
console.log(ta)
var inp = document.getElementById('i')
console.log(i)
ta.value = 'Added as value.'
i.value = 'Added as value.'
ta.innerText = "Added as innerText";
i.innerText = "Added as innerText";