Frage im Vorstellungsgespräch bei Apptware

Write a JavaScript program, given the input array arr = [3, 4, 5, 6, 7] and target = 10, the function should return [[3, 7], [4, 6]], as these are the pairs of integers from the array that add up to 10.