Test 14 of task 4 of Coordinate Transformation on the JavaScript tag keeps failing

I am not sure what’s wrong with my code. All other tests have passed apart from this one. Can somebody please help.

export function memoizeTransform(f) {
  let prevX, prevY, prevResult;
  return (x, y) => {
    if (prevX === x && prevY === y) {
    return prevResult;
  } else {
    prevX = x;
    prevY = y;
    prevResult = f(x, y)
    return prevResult;
  }
  }  
}

Please show the test results. There are 6 tests for memoization, which ones are failing?

Here’s the test result

const memoizedTranslate = memoizeTransform(translate2d(1, 2));
expect(memoizedTranslate(2, 2)).toEqual([3, 4]);
expect(memoizedTranslate(6, 6)).toEqual([7, 8]);

Test Failure

Error: expect(received).toEqual(expected) // deep equality

- Expected  - 2
+ Received  + 2

  Array [
-   7,
-   8,
+   9,
+   10,
  ]

Thanks, managed to solve it, it was a syntax error.