const getMousePosition = (x, y) => ({
x: x,
y: y
});
//can be written as
const getMousePosition = (x, y) => ({ x, y });
const getMousePosition = (x, y) => ({
x: x,
y: y
});
//can be written as
const getMousePosition = (x, y) => ({ x, y });