MindFusion.Charting for JavaScript Programmer's Guide
IEnumerable.last Method
See Also
Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: None Language Filter: C# Language Filter: Visual Basic Language Filter: Java Language Filter: JavaScript Language Filter: C++ Language Filter: XAML

C#
Visual Basic
Java
JavaScript
C++
XAML

Returns the last element in the collection.

Namespace: MindFusion.Common.Collections
File: IEnumerable.js

## Syntax

JavaScript Copy Code
function last ()

### Return Value

Type: Object
Object. The last element in the collection.

## Example

The following code checks if the last item in the collection of items of a ListView before the collection was changed is an object called _item:

JavaScript Copy Code
listView.selectionChanged.addEventListener(listSelectionChanged); function listSelectionChanged(sender, args) { if( args.oldItems.items().last() == _item) { //do something } }

## See Also

IEnumerable Members
IEnumerable Class
MindFusion.Common.Collections Namespace