結果 : how to exit from if statement in javascript