Returns the last element in the collection.
Namespace: MindFusion.Mapping
Package: IEnumerable.js
JavaScript Copy Code |
---|
function last () |
Object. The last element in the collection.
The following code checks if there are items in a DecorationLayer decorations property. If yes, it gets the last one. The decorations property is of type ObservableCollection, which derives from IEnumerable.
JavaScript Copy Code |
---|
if(markers.decorations.count > 0) { var last = markers.decorationslast(); } |