You are viewing a single comment's thread. Return to all comments →
JS
function staircase(n) { // Write your code here for (let i = 0; i < n; i++) { let output = ''; for (let j = 0; j < n; j++) { j < (n - 1 - i) ? output += ' ' : output += '#'; } console.log(output); } }
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 →
JS