``````const findSum = (arr, sum) =>
arr.some((set => n => set.has(n) || !set.add(sum - n))(new Set));

// Tests below
describe('findSum', function() {

it('returns TRUE if adding two numbers in an array yield the given value', () => {
expect(findSum([1, 2, 4, 4], 8)).toEqual(true);
});

it('returns FALSE if adding two numbers in an array does not yield the given value', () => {
expect(findSum([1, 2, 5, 9], 8)).toEqual(false);
});

it('does not count any value twice', () => {
expect(findSum([1, 2, 4, 9], 8)).toEqual(false);
expect(findSum([1, 2, 5, 6], 12)).toEqual(false);
});

it('can handle negative values', () => {
expect(findSum([-2, 1, 1, 4], 2)).toEqual(true);
expect(findSum([-3, -2, 1, 4], -5)).toEqual(true);
expect(findSum([-7, -3, -2, -1], -8)).toEqual(true);
});

it('can handle zero values', () => {
expect(findSum([-2, 0, 0, 1], 0)).toEqual(true);
expect(findSum([0, 0, 0, 0], 0)).toEqual(true);
expect(findSum([-1, 0, 1, 2], 0)).toEqual(true);
});

it('works correctly when the given array is unordered', () => {
expect(findSum([4, 2, 4, 1], 8)).toEqual(true);
expect(findSum([9, 2, 7, 1], 3)).toEqual(true);
});
});``````