logo
Search
showing results for - "js stairs algorithm"
Veronica
22 Feb 2017
1function staircase(n) {
2    let filledArray = new Array(n).fill(' ');
3    while (filledArray.indexOf(' ') !== -1) {
4        filledArray.shift();
5        filledArray.push('#');
6        console.log(filledArray.join(""));
7        n--;
8    }
9}
similar questions
function that return shortest of words in the given array jscounting valleys hackerrank solution javascriptfirst n even numbers sum javascripthow to solve javascript algorithm problemthe sum of all first n natural numbers jsshuffling in jsnl2br javascriptadd nodes to binary tree jsjavascript challenges for beginnerscube of a number javascriptjavascript counting valleyswhat is shortest javascript programcube function javascriptjavascript stepsrubik 27s cube algorithm in javascriptcurrying javascript sumjavascript problems for beginners
queries leading to this page
inverse of a staircase jsjs stairs algorithmcreate stairs in jsstaircase example javascriptjs stairs algorithm
privacy policyterms of useinstagram
Crafted with  ♥  for everyone

sign in to continue
your answer for
you will get a confirmation link on this - you will have to click that for successful submission of your answer. we require this to keep the website free of spam, bots and unhelpful content
please ensure to add code which is syntactically corrent and executes properly
sign in to continue
ask question on maxinterview
you will get a confirmation link on this - you will have to click that for successful submission of your question. we require this to keep the website free of spam, bots and unhelpful content
please be clear, to the point and respectful
sign in to continue