Update app.js

Use ternary here to be less obscure. Just like @gusakov.nik proposed.
Merge pull request #1 from sudodoki/patch-1

Update app.js