Change for-loop in findTeam to make it more readable

This commit is contained in:
Jonny 2019-05-03 13:13:56 +02:00 committed by JP1998
parent 2ea9668f38
commit 74a1052e25
1 changed files with 3 additions and 3 deletions

View File

@ -1,8 +1,8 @@
export function findTeam(teams, id) { export function findTeam(teams, id) {
for(let i = 0; i < teams.length; i++) { for(var team of teams) {
if(teams[i].id === id) { if(team.id === id) {
return teams[i]; return team;
} }
} }
return null; return null;