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
{{ message }}
Repository navigation
Commit 42621a1
Browse filesBrowse the repository at this point in the historyBrowse files
letactiveClassesObj={};// will store the name of each active class
57
+
constactiveClasses=classes.filter(c=>c.active);// stores classes that have active: true from classes array
58
+
59
+
activeClasses.forEach(activeClass=>{
60
+
constpeopleByClass=getPeopleOfClass(activeClass.name);// used activeClass.name from each class object and get results using prev. function
61
+
62
+
returnactiveClassesObj[activeClass.name]=peopleByClass;// set each object inside the activeClassesObj to the name of each activeClass array and store the result of using the prev. function
63
+
});
64
+
65
+
returnactiveClassesObj;
34
66
};
35
67
// You can uncomment out this line to try your function
0 commit comments