---
title: "Comment by Saquib Hussain on \"7 Useful JavaScript Tricks and Tips\" | Hashnode"
description: "Under what circumstances would we need to remove array duplicates? Does it really affect the code a lot?"
url: "https://hashnode.com/posts/7-useful-javascript-tricks-and-tips/6098c0041ea29f2c341e204d/comment/6098f28221068818a5c63ba4"
---

[Discussion](https://hashnode.com/posts/7-useful-javascript-tricks-and-tips/6098c0041ea29f2c341e204d)

Comment [7 Useful JavaScript Tricks and Tips](https://hashnode.com/posts/7-useful-javascript-tricks-and-tips/6098c0041ea29f2c341e204d)

[Saquib Hussain](https://hashnode.com/@saquibxhussain)

[May 10, 2021](https://hashnode.com/posts/7-useful-javascript-tricks-and-tips/6098c0041ea29f2c341e204d/comment/6098f28221068818a5c63ba4)

Under what circumstances would we need to remove array duplicates? Does it really affect the code a lot?

[Michael Karén](https://hashnode.com/@melcor76)

[May 10, 2021](https://hashnode.com/posts/7-useful-javascript-tricks-and-tips/6098c0041ea29f2c341e204d/comment/6098f28221068818a5c63ba4#reply-6098f6681ea29f2c341e295b)

If you want to present a list to a user and you have duplicates then it makes sense to first filter the list.

I mostly wanted to show this tip because the Set object is new with ES6 and is good to be aware of.

[Saquib Hussain](https://hashnode.com/@saquibxhussain)

[May 10, 2021](https://hashnode.com/posts/7-useful-javascript-tricks-and-tips/6098c0041ea29f2c341e204d/comment/6098f28221068818a5c63ba4#reply-60990c9d1ea29f2c341e2bc6)

Yeah, true. That makes more sense now! Thanks for the prompt response, buddy. By the way, would you be open to writing Developer content for businesses? Let me know. [Michael Karén](https://hashnode.com/@melcor76)

[Michael Karén](https://hashnode.com/@melcor76)

[May 11, 2021](https://hashnode.com/posts/7-useful-javascript-tricks-and-tips/6098c0041ea29f2c341e204d/comment/6098f28221068818a5c63ba4#reply-609a61dc21068818a5c65b73)

Thanks for the offer [Saquib Hussain](https://hashnode.com/@saquibxhussain) but I'm mostly writing for fun when I have the time.
