I am looking at the documentation here but can not find what I am looking for.
What I would like to achieve is something like this:
var valueToSearchFor = "something"
function SearchArray(currentIndex, valueToSearchFor){
return currentIndex.PropertyName === valueToSearchFor;
}
var attribute = myArray.find(SearchArray(valueToSearchFor));
rather than:
var valueToSearchFor = "something"
function SearchArray(currentIndex){
return currentIndex.PropertyName === valueToSearchFor;
}
var attribute = myArray.find(SearchArray);
In my case the valueToSearchFor is not thread safe. Am I missing something?