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) {
for(let i = 0; i < teams.length; i++) {
if(teams[i].id === id) {
return teams[i];
for(var team of teams) {
if(team.id === id) {
return team;
}
}
return null;