It depends entirely on what the calling code is expected to do with the returned coordinates. If your current code just needs direct access to the x and y properties, use the literal:
return {x: x, y: y};
Or with modern and/or transpiled JavaScript:
return { x, y };
If you need a more sophisticated return value, just change it:
return new Coordinates(x, y);
Or this:
return BuildCoordinate(x, y);
As long as the new return-value has x and y properties (or getters), your legacy code will still work.
As noted in Sayem's answer, you can also "destructure" return values in ECMAScript 6, or if you're using a web-aware transpiler/builder:
let { x, y } = get_coords();