結果 : if then else one line javascript