lodash findLastIndex Lab

Medium
25.0% Acceptance

In this hands-on lab, you will create a function called findLastIndex that mimics the behavior of the popular utility library lodash's _.findLastIndex(). Your findLastIndex function should return the index of the last element in the array for which the callback provided returns a truthy value.

Your function should receive the following arguments:

  1. An array.
  2. A callback function.

Your findLastIndex function should return -1 if the predicate does not match any element. Write your code in the index.js file and export it using ESM syntax. Make sure to follow the challenges provided.