let row="" let n=11 row="e".repeat(n+1) console.log(row) let col=""; for(let i=1;i<=n;i++){ col+=" ".repeat(n/2+1)+ "*".repeat(i) console.log(col) }
Standard input is empty
eeeeeeeeeeee
*
* **
* ** ***
* ** *** ****
* ** *** **** *****
* ** *** **** ***** ******
* ** *** **** ***** ****** *******
* ** *** **** ***** ****** ******* ********
* ** *** **** ***** ****** ******* ******** *********
* ** *** **** ***** ****** ******* ******** ********* **********
* ** *** **** ***** ****** ******* ******** ********* ********** ***********