JavaScript code seperated from HTML file(app.js)