javascript if then else one line