Update app.js

All 8 steps complete with logic. Time to refine and make it work with n = any number.