Guest User

Untitled

a guest
Oct 20th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. const indexOfObj = (array, key, value) => {
  2. for (let i = 0; i < array.length; i++) {
  3. if (array[i][key] === value) {
  4. return i;
  5. }
  6. }
  7. return -1;
  8. };
Add Comment
Please, Sign In to add comment