How to Manipulate Arrays in JavaScript

added by JavaScript Kicks
8/19/2019 12:00:00 AM

998 Views

Set is a object that cannot have duplicate entries. You can create a new Set from an array then convert it back to an array. const array = [1,2,2,3];const arrayWithDups = Array.from(new Set(array)); //returns new array without duplicates, [1,2,3] Returns a new array from startIndex to endIndex - 1 .


0 comments