結果 : check two conditions in javascript