結果 : javascript convert ternary operator to if else