---
title: "Comment by -- on \"How to Remove Duplicates from an Array using .includes() and a for...of Loop\" | Hashnode"
description: "use set and do it in one line [...new Set(...array)]"
url: "https://hashnode.com/posts/how-to-remove-duplicates-from-an-array-using-includes-and-a-forof-loop/63ff3e2e79dada24d2af67d4/comment/63ff5109186c084437fad989"
---

[Discussion](https://hashnode.com/posts/how-to-remove-duplicates-from-an-array-using-includes-and-a-forof-loop/63ff3e2e79dada24d2af67d4)

Comment [How to Remove Duplicates from an Array using .includes() and a for...of Loop](https://hashnode.com/posts/how-to-remove-duplicates-from-an-array-using-includes-and-a-forof-loop/63ff3e2e79dada24d2af67d4)

[\--](https://hashnode.com/@myesolar)

[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)\]
