es.array.find-last-index.js 567 B

1234567891011121314
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var $findLastIndex = require('../internals/array-iteration-from-last').findLastIndex;
  4. var addToUnscopables = require('../internals/add-to-unscopables');
  5. // `Array.prototype.findLastIndex` method
  6. // https://tc39.es/ecma262/#sec-array.prototype.findlastindex
  7. $({ target: 'Array', proto: true }, {
  8. findLastIndex: function findLastIndex(callbackfn /* , that = undefined */) {
  9. return $findLastIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  10. }
  11. });
  12. addToUnscopables('findLastIndex');