Update app.js

Fixed scope