DEV Community

Cover image for Lockdown Fun: Pascal's Triangle
Mads Stoumann
Mads Stoumann

Posted on

Lockdown Fun: Pascal's Triangle

About 7 or 8 years ago, there was a teachers-strike in Denmark, and I had to teach my daughter's class in Math. I made a lot of small "apps" and tasks, which I just uncovered from an old folder.

Here's an updated version of one: "Pascal's Triangle" — for kids of all ages in Lockdown.

Click on all numbers divisible by 5 to see the hidden pattern!

When viewed on larger screens, you can toggle on/off the row explanations and colors. You'll also see the sum of each row at the left side of the screen. This should be a recognizable pattern to developers — tell your kids about the power of two!

If you have kids that are really bored — set the "rows" in the JavaScript-section of the Pen to more than 50 (requires a very large screen!), and have them click on all numbers divisible by 5!

Have a great weekend!

Top comments (0)