Rectangle 27 0

javascript How to fix jslint error 'Don't make functions within a loop.' while using find function inside loop?


function findUser(users, currUserid) {
  return find(users, user => user.id === currUserid)
}


while(condition) {
  const userObj = findUser(users, currUserid);
}
Note