I dont get why is there a () containing the curly brackets of the function

const getMousePosition = (x, y) => ({
  x: x,
  y: y
});

Enlaza al desafío:

It’s an odd case. You can’t start an expression with a curly brace or JS will assume that it is a code block. In this case you need it to tell JS that it is not a code block but an object literal.

1 Like

this si an object, not the curly brackets of a function, that’s why there is the round parenthesis, to say that that is not the curly brackets of a function, but those of an object

1 Like