I'm not a core JavaScript developer. I'm stuck to understand below code :-
export const getSupervisor = createSelector(
[getAllOrgChartUsers, getUserById],
(users, child) => users.get(child.get('parent'))
);
Can someone pls explain me whole code functioning here...especially what is this comma (,) doing after this line [getAllOrgChartUsers, getUserById], ?
What I'm able to guess is each function i.e. getAllOrgChartUsers() and getUserById() is doing something and returning some data which we are passing into this ES6 anonymous looking like function by using this brackets (users, child) ? Is it so? If correct then instead of comma, don't we have semi-colon (;) to terminate the first line of statement i.e. [getAllOrgChartUsers, getUserById], and then move to another independent line?
Please explain to me, thanks