Skip to content

Instantly share code, notes, and snippets.

@anjanaraveendra
Created October 20, 2015 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anjanaraveendra/f0a81235fc5d46c14cec to your computer and use it in GitHub Desktop.
Save anjanaraveendra/f0a81235fc5d46c14cec to your computer and use it in GitHub Desktop.
<script>
var tempStr = "",prevNumber=1,i,depth=10;
for(i=0;i<depth;i++){
tempStr = "";j=0;
while(j<= i){
tempStr = tempStr + " " + prevNumber;
j++;
prevNumber++;
}
console.log(tempStr);
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment