結果 : another way to write if statement in javascript