---
title: "Discussion on \"How to Remove Duplicates from an Array using .includes() and a for...of Loop\" | Hashnode"
description: "Discussion on \"How to Remove Duplicates from an Array using .includes() and a for...of Loop\". Arrays are a fundamental data structure in JavaScript that allows developers to store and manipulate collections of values. However, when working with arrays, it's common to encounter duplicates that need to be removed to perform operations such as f..."
url: "https://hashnode.com/posts/how-to-remove-duplicates-from-an-array-using-includes-and-a-forof-loop/63ff3e2e79dada24d2af67d4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Remove Duplicates from an Array using .includes() and a for...of Loop](https://iyanucodes.hashnode.dev/how-to-remove-duplicates-from-an-array-using-includes-and-a-forof-loop?utm_source=hashnode&utm_medium=feed)

Arrays are a fundamental data structure in JavaScript that allows developers to store and manipulate collections of values. However, when working with arrays, it's common to encounter duplicates that need to be removed to perform operations such as f...

Mar 1, 2023 · 3 min read · iyanucodes.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#array](https://hashnode.com/tag/array)

## Written by

[IyanuØluwa](https://hashnode.com/@iyanucodes)

@iyanucodes

  
[View profile](https://hashnode.com/@iyanucodes)

Frontend Developer

I am IyanuØluwa, a passionate self taught frontend developer from Nigeria

## Responses 2

Markdown supported · ⌘↵ to post

[IyanuØluwa](https://hashnode.com/@iyanucodes)

[Mar 1, 2023](https://hashnode.com/posts/how-to-remove-duplicates-from-an-array-using-includes-and-a-forof-loop/63ff3e2e79dada24d2af67d4/comment/63ff51d3186c084437fad9a2)

I specified this in the conclusion ✅

[Mar 1, 2023](https://hashnode.com/posts/how-to-remove-duplicates-from-an-array-using-includes-and-a-forof-loop/63ff3e2e79dada24d2af67d4/comment/63ff5109186c084437fad989)

use set and do it in one line \[...new Set(...array)\]
