---
title: "Discussion on \"JavaScript: Remove duplicates from array without using any shortcut methods\" | Hashnode"
description: "Discussion on \"JavaScript: Remove duplicates from array without using any shortcut methods\". let arr = [2, 1, 3, 1, 7, 1, 7, 9, 3];\n\nfunction removeDuplicates(arr) {\n    let obj = {};\n    let arrWithNoDuplicates = [];\n    for (let i = 0; i < arr.length; i++) {\n        obj[arr[i]] = true;\n    }\n\n    for (let key in obj) {\n        arrWithNoDup..."
url: "https://hashnode.com/posts/javascript-remove-duplicates-from-array-without-using-any-shortcut-methods/6325ea687ae3b59ef0063826"
---

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

Discussion

# [JavaScript: Remove duplicates from array without using any shortcut methods](https://harikrishna.hashnode.dev/javascript-remove-duplicates-from-array-without-using-any-shortcut-methods?utm_source=hashnode&utm_medium=feed)

let arr = \[2, 1, 3, 1, 7, 1, 7, 9, 3\]; function removeDuplicates(arr) { let obj = {}; let arrWithNoDuplicates = \[\]; for (let i = 0; i < arr.length; i++) { obj\[arr\[i\]\] = true; } for (let key in obj) { arrWithNoDup...

Jan 17, 2022 · 1 min read · harikrishna.hashnode.dev  
Updated Sep 27, 2022  
Read the article

-   [#remove-duplicates-in-an-array](https://hashnode.com/tag/remove-duplicates-in-an-array)

## Written by

[Hari Krishna Anem](https://hashnode.com/@hkrishna)

@hkrishna · Hyderabad, India

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

Full stack developer

Full stack developer (ReactJS, NodeJS, JavaScript, PHP, SQL)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
