Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

find unique elements in array

const arr1=[1,2,3,4,5,5];

const unique = arr1.filter((item, index, array)=>
  array.indexOf(item)===index
)
console.log(unique)
Source by practicum.yandex.com #
 
PREVIOUS NEXT
Tagged: #find #unique #elements #array
ADD COMMENT
Topic
Name
3+4 =