const array = [1, 1, 2, 3, 5, 5, 1];
const uniqueArray = [...new Set(array)];
console.log(uniqueArray); // [1, 2, 3, 5]
Thanks for reading 💙
Follow @codedrops.tech for daily posts.
Instagram ● Facebook
Micro-Learning ● Web Development ● Javascript ● MERN stack
codedrops.tech
Top comments (0)