[ '*' ]
, [ ' * ',
' *** ',
'*****' ],
[ ' * ',
' *** ',
' ***** ',
' ******* ',
'*********' ]
.const tower = length =>
Array.from({ length }, (n, i) => Array(2)
.fill(' '.repeat(length - i - 1))
.join('*'.repeat(i * 2 + 1))
);
const tower = length =>
Array.from({ length }, (n, i) => (
n = Array(length - i).join(' '),
n + Array(-~i << 1).join('*') + n
));