tell me the best way to get value which doesn’t intersect between 2 arrays?

Use _.xor() to find the symmetric difference – the numbers that are in one of the arrays, but not both:

const arr1 = [1, 2, 3]
const arr2 = [2, 3, 4]

const result = _.xor(arr1, arr2)

<script src=""></script>

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top