13. What is the purpose of find index in AngularJS and what does it return if no value is found?

Find index returns the position of an element in an object. If the requested element is not found then -1 is returned.

var index = $scope.items.findIndex(record => record.date ==’2018-12-12′);
In the above code, index of the object is returned where item.date=2018-12-12.