# 7.2 練習：陣列項目不能重覆

## 練習：陣列項目不能重覆

提供一個陣列：

```javascript
let line_ids = ["a", "b", "c", "a", "y", "c"];
```

撰寫 jQuery 語法，執行迴圈，將重覆的 line\_id 移除。

印出結果如下：

```javascript
["a","b","c","y"]
```

參考作法：

{% embed url="<https://codepen.io/carlos411/pen/QWKeXBX>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.webmix.cc/jquery/7.-shi-yong-han-shi-utility-functions/7.3-lian-xi-zhen-lie-xiang-mu-bu-neng-zhong-fu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
