2 var ArrayBufferViewCore = require('../internals/array-buffer-view-core');
3 var apply = require('../internals/function-apply');
4 var $lastIndexOf = require('../internals/array-last-index-of');
6 var aTypedArray = ArrayBufferViewCore.aTypedArray;
7 var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
9 // `%TypedArray%.prototype.lastIndexOf` method
10 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
11 exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
12 var length = arguments.length;
13 return apply($lastIndexOf, aTypedArray(this), length > 1 ? [searchElement, arguments[1]] : [searchElement]);