I am using ArcGIS Pro 3.0.0 and a File Geodatabase.
I have a requirement to use Arcade for configuring some Attribute Rules related to the geometry of the features involved which has led me to realize that I am an Arcade beginner. As a learning exercise I am trying to use Arcade for labeling a polyline using the X coordinate of its last vertex without running Calculate Geometry Attributes to add a field first.
I have learned that I can label a polyline with the X coordinate of its first vertex using this Arcade expression:
var first_vertex = Geometry($feature).paths[0][0];
return Text(first_vertex.X);
but how do I label it using the X coordinate of its last vertex?