index.js
//remove duplicate value from an array function getUnique(arr){ // removing duplicate, converting to set and then array const uniqueArr = [...new Set(arr)]; // returning the array return uniqueArr; } const array = [1, 2, 3, 2, 3]; // calling the function const uniqueArr = getUnique(array); // printing the array console.log(uniqueArr);