Update app.js

code review