> For the complete documentation index, see [llms.txt](https://docs.webmix.cc/jquery/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](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).

# 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>" %}
