One Line If Statement Javascript