Question 1 of 29
In a modern JavaScript application, you are tasked with implementing a function that takes an array of user objects and returns a new array containing only the users who are active and have a specified role. The function should utilize ES6+ features such as arrow functions, destructuring, and the spread operator. Given the following user data:
javascript
st users = [
d: 1, name: 'Alice', active: true, role: 'admin' },
d: 2, name: 'Bob', active: false, role: 'user' },

Preparing for SalesForce Certified JavaScript Developer I Certified JavaScript Developer I? Now land the interview.

73% of qualified candidates get rejected because of weak resumes. Build an ATS-optimized, recruiter-ready resume in under 5 minutes - free to start.

Build My Resume Free