How can I extract the value of a specific field from an array element in Javascript? [duplicate]

If I have an array similar to this:

const array = [{x: 5, y: 12}, {x: 12, y: 13}, etc...];

And I store the first array element in a variable:

let firstElement = array[0];

How can I extract the value of x or y from this firstElement?

Thanks.