Skip to content

Duplicate #123447

Duplicate #123447
May 11, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

// Given this is the array

const arr = [1, 2, 3, 1, 2, 5, 1]
const duplicateRemoved = [...new set(arr)]
console.log(duplicateRemoved)

// this will removed the duplicate

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ebndev
Comment options

Answer selected by BarryYuniwo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment