JSFiddle - React, Tailwind, and code Playground

by zlojnaxa

HTML

<div id="result"></div>

JavaScript

let max = +prompt("Введите число", "5"), tmp = "", res = "";
for(i=0; i<max; i++){
	tmp += "*";
    res += '<br>' + tmp;
}
document.getElementById('result').innerHTML = res;