Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- printEachName = (companyNames, newPeople, counter, callback) => {
- if (companyNames.length === newPeople.length) {
- return callback(false, companyNames);
- }
- console.log('counter >>> ', counter);
- let newP = newPeople[counter];
- companyNames.push(newP.name);
- printEachName(companyNames, newPeople, counter + 1, callback);
- }
Add Comment
Please, Sign In to add comment