JSFiddle - React, Tailwind, and code Playground

by some

HTML

<textarea id="emptytext2"></textarea>

<button id="emptytext3" type="button" onclick ="seethestars1()">Click for the stars</button>

JavaScript

function seethestars1() {
  var stars = document.getElementById("emptytext2");
  for (var i = 10; i >0 ; --i) {
    for (var j = 0; j < i; j++) {
      stars.value += "*";
    }
    stars.value += "\n";
  }
}