You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, I like that you gave the holder object in this file a useful name and that the names of the methods map to the tables they're changing.
Can you explain the reason for using the len variable in populateTeams.team? I have seen another team do something similar and I don't see why you can't just put the final call to cb outside of the forEach loop. If it's because you need the id variable that's in scope of the callback then you could just assign it to an outer variable.
I like your general approach of building up the user teams, though I think that a combination of map and filter would be easier to read on line 71.
The text was updated successfully, but these errors were encountered:
First of all, I like that you gave the holder object in this file a useful name and that the names of the methods map to the tables they're changing.
Can you explain the reason for using the
len
variable inpopulateTeams.team
? I have seen another team do something similar and I don't see why you can't just put the final call tocb
outside of theforEach
loop. If it's because you need theid
variable that's in scope of the callback then you could just assign it to an outer variable.I like your general approach of building up the user teams, though I think that a combination of
map
andfilter
would be easier to read on line 71.The text was updated successfully, but these errors were encountered: