Santosh Shah

  • About
  • Contact
  • Portfolio
  • Gallery
  • HIRE ME

Create Pyramid structure from javascript

In this article, I am going to show you how to create a pyramid structure from javascript.

Create Pyramid structure from javascript simple nested loop

var rows = 10

for(var i=0; i<=rows; i++){
	for(var k=1; k<=rows-i; k++){
		document.write(" ")
	}
	for(var j=0; j<=i; j++) {
		document.write("* ");
	}
	document.write("
") }

The above code with return a pyramid structure as shown in featured image.

May 1, 2018Santosh Shah
Find wally on Google map.Difference between req params req body and req query in Nodejs
You Might Also Like
 
Difference between req params req body and req query in Nodejs
 
Creative business card for photography

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Santosh Shah

My name is Santosh Shah and blogs at santosh-shah.com

9 months ago Javascript212


Recent Posts
  • Convert HTML entity code script
  • Get a value from url
  • Create an AJAX call
  • Compare identical array
  • Update cordova android
  • How to update npm to latest version
  • Difference between req params req body and req query in Nodejs
  • Create Pyramid structure from javascript
  • Find wally on Google map.
  • Remove duplicate array based on api response attribute value
Archives
  • December 2018 (2)
  • October 2018 (3)
  • September 2018 (2)
  • May 2018 (1)
  • April 2018 (1)
  • March 2018 (1)
  • December 2017 (1)
  • April 2017 (1)
  • March 2017 (1)
  • February 2017 (1)
  • December 2016 (1)
  • November 2016 (3)
  • February 2016 (4)
  • January 2016 (2)
  • November 2015 (2)
  • October 2015 (8)
  • August 2015 (3)
  • June 2015 (1)
  • May 2015 (3)
  • April 2015 (1)
  • March 2015 (6)
  • February 2015 (10)
  • January 2015 (14)
  • December 2014 (13)
  • November 2014 (4)
  • September 2014 (1)
  • August 2014 (4)
  • July 2014 (1)
  • February 2014 (7)
  • January 2014 (15)
Categories
  • AngularJS (3)
  • drupal (1)
  • HTML (7)
  • Javascript (9)
  • jquery (9)
  • nodejs (2)
  • php (1)
  • sass (5)
  • seo (2)
  • tips and tricks (13)
  • Uncategorized (47)
  • utorrent (1)
  • window7 (5)
  • wordpress (25)
Follow us on
0
GooglePlus
0
Facebook
0
Twitter
Tags
wordpressangularjscustomized woocommercedivi themephpif elsewordpress searchsearch only post typelocalhostfilter search wordpressurlphotoshopfilter searchIE8 hacks.icoshortcodecustom shortcodewordpress pages shortcodesdashboard pages shortcodeIE hacksIE7 hackscss hackswordpress home Urlconditionalchild wordpresswordpress child themechild-themecreate child themewoocommerceadd new tab woocommercewoocommerce customzedwoocommerce template customizedwordpress woocommercewordpress dynamic widgetwidgetduplicatejQuerydefault imagefeature imageimagecontact-form-7dynamic widgetemailccBCC
Recent Comments
  • kotaro.hyhy on Add class active on page refresh jquery
  • Angela on Add class active on page refresh jquery
  • yogesh on Add class active on page refresh jquery
EMAIL SUBSCRIPTION

Sign up for our newsletter to receive the latest news and event postings.

2016 © Santosh Shah