Answers for "how to match two array in javascript"

1

two array in one js

let arr1 = ["item1", "item2", "item3"]
let arr2 = ["item4", "item5", "item6"]

let arr3 = arr1.concat(arr2) //[ 'item1', 'item2', 'item3', 'item4', 'item5', 'item6' ]
Posted by: Guest on November-03-2021
2

javascript find matching elements in two arrays

const intersection = array1.filter(element => array2.includes(element));
Posted by: Guest on June-25-2020

Code answers related to "how to match two array in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language