Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
Deduplicate an array using a single line of JavaScript
node v8.17.0
version:
1.0.0
endpoint
share
tweet
Deduplicate a JavaScript array using a single line of ES5/6+. Works in Node and browsers (IE11+).
Shared by the team building https://www.searchmy.bio and https://www.wethrift.com
const deduplicated_array = Array.from(new Set(['one', 'two', 'three', 'two', 'one']))
Loading…
no comments
sign in
to comment