<?xml version="1.0" encoding="UTF-8" ?>
<dt-api group="utility">
	<name>lastIndexOf()</name>
	<summary>Find the last instance of a value in the API instance's result set.</summary>
	<since>1.10</since>

	<type type="function">
		<signature>LastIndexOf( value )</signature>
		<description>Find the last instance of a value in the API instance's result set.</description>
		<parameter type="*" name="value">
			Value to find in the instance's result set.
		</parameter>
		<returns type="integer">The index of the item in the result set, or -1 if not found.</returns>
	</type>

	<description>
		It is often very useful to know if a value is in a result set, and further, what its position is in the result set if it is present. This method provides exactly that ability, searching for the value given, starting from the last item in the instance's result set and working back thought the result set (see `dt-api indexOf()` to search for the first instance of a value) and giving its position in the result set.

		This method makes use of the fact that DataTables API objects are "array like", in that they inherent a lot of the abilities and methods of the Javascript `Array` type.

		In this case, this method is a proxy for the Javascript `Array.prototype.lastIndexOf` method and is provided as a utility method for the DataTables API. For more information about the original method, please refer to the [Mozilla MDN documentation for `lastIndexOf`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf). In browsers which do not support `lastIndexOf` natively, a polyfill is provided to allow this DataTables method to operate as expected.
	</description>

	<example title="Find the last index of an item in a column of data"><![CDATA[
var table = $('#example').DataTable();

var index = table
	.column( 0 )
	.data()
	.lastIndexOf( 21 );

if ( index < 0 ) {
	alert( '21 was not found in the result set' );
}
else {
	alert( '21 was found at index: '+index );
}

]]></example>

</dt-api>