DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR TYPESCRIPT
function to find the unique elements from two arrays
var array3 = array1.filter(function(obj) { return array2.indexOf(obj) == -1; });
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#function
#find
#unique
#elements
#arrays
ADD COMMENT
Topic
COMMENT
Name
4+3 =
Submit