I am currently working with the the ArcGIS API for JavaScript and I have delved into ArcGIS API for JavaScript currently for a weeks, so I am not that familiar with the ArcGIS API for JavaScript.
For now I managed to create a webapplication with a nice Map and a layerlist, so I managed to learn about the basic widgets of ArcGIS API.
However I included code in which whenever I click on an object of the layerlist it will show an popup and execute a certain function. For my function, I would like to have the location of the selected feature in coordinates (presumably in WGS84 coordinates). I was therefore wondering how I would be able to retrieve the coordinates of the selected feature, in the attributetable of the feature, there are no longitude and latitude columns for example, so I was wondering in which other way I would be able to retrieve the coordinates of the selected feature and being able to store it into a variable. (Whether there is a widget for that for example)
I currently use the JavaScript API 4.10 version. EDIT: The layer is a feature layer.