This project is to execute something called a hailstone sequence. Here are the steps: 1. Start with any positive integer. 2. Repeat the following steps until you get 1: 3. If it's even, divide by 2. 4. If it's odd, multiply by three, then add 1.
I got some homework from my math teacher to write a program to prove that you'll always get 1 by doing the sequence above. I made this in JavaScript, too.