Question: Need help with this - Given an array of users, write a function, namesAndRoles that returns all of user's names and roles in a string
Need help with this - Given an array of users, write a function, namesAndRoles that returns all of user's names and roles in a string with each value labeled.
For example: const users = [ { name: 'Homer', role: 'Clerk', dob: '12/02/1988', admin: false },
{ name: 'Lisa', role: 'Staff', dob: '01/30/1965', admin: false },
{ name: 'Marge', role: 'Associate', dob: '09/10/1980', admin: true } ] namesAndRoles(users) // Name: Homer // Role: Clerk // Name: Lisa // Role: Staff // Name: Marge // Role: Associate
function namesAndRoles(users) { return users } namesAndRoles(users)
The answer posted in Chegg - https://www.chegg.com/homework-help/questions-and-answers/given-array-users-write-function-namesandroles-returns-user-s-names-roles-string-value-lab-q54986841?trackid=09fee934ba25&strackid=56da9ea9f4fc is now incorrect.
Pls help. Thank you.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
