結果 : call function in if statement javascript