結果 : throw error in if statement javascript