You are viewing a single comment's thread. Return to all comments →
JavaScript one-liner (not the most efficient :P)
const staircase = n => console.log(new Array(n).fill(0).map((_, idx) => "#".repeat(idx + 1).padStart(n)).join('\n'));
Seems like cookies are disabled on this browser, please enable them to open this website
Staircase
You are viewing a single comment's thread. Return to all comments →
JavaScript one-liner (not the most efficient :P)