Tracks
/
JavaScript
JavaScript
/
Exercises
/
Pascal's Triangle
Pascal's Triangle

Pascal's Triangle

Medium

Instructions

Compute Pascal's triangle up to a given number of rows.

In Pascal's Triangle each number is computed by adding the numbers to the right and left of the current position in the previous row.

    1
   1 1
  1 2 1
 1 3 3 1
1 4 6 4 1
# ... etc
Edit via GitHub The link opens in a new window or tab
JavaScript Exercism

Ready to start Pascal's Triangle?

Sign up to Exercism to learn and master JavaScript with 33 concepts, 146 exercises, and real human mentoring, all for free.