Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

return index of array with function in array angular

const a = [
{ firstName: "Adam", LastName: "Howard" },
{ firstName: "Ben", LastName: "Skeet" },
{ firstName: "Joseph", LastName: "Skeet" }];

let index = a.findIndex(x => x.LastName === "Skeet");
console.log(index);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #return #index #array #function #array #angular
ADD COMMENT
Topic
Name
4+2 =