結果 : ternary operator for multiple conditions in javascript