What is the efficient way to get the uncommon elements between two arrays?
const A = [1, 2, 3, 4];
const B = [2, 4, 5, 6];
expected output: [1, 3, 5]
All the answers I found, they show the difference between A and B. But I need all the uncommon elements between A and B.