1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Print pyramid in following pattern in javascript

Discussion in 'Web Design & Development' started by darshit, Dec 13, 2018.

Thread Status:
Not open for further replies.
  1. darshit

    darshit Thread Starter

    Joined:
    Dec 13, 2018
    Messages:
    1
    I want to print pyramid in javascript as shown below:-
    when a function is called like pyramid(5)
    1
    1 2 3
    1 2 3 4 5
    1 2 3 4 5 6 7
    1 2 3 4 5 6 7 8 9

    I need number of lines that is passed as parameter

    Thanks
     
  2. colinsp

    colinsp

    Joined:
    Sep 5, 2007
    Messages:
    2,264
    First Name:
    Colin
    This sounds like a homework question and we don't do that here.

    If it's not then what code do you have so far and what's not working?
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1220459

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice