Chain Compatible Results
Chain Compatible Results
Array methods chain when one method returns the kind of value the next method expects. A filtered array can be mapped because it is still an array.
The order matters. If you need only active users, keep the matching records first, then transform the remaining records into display text.
Your task: Complete activeDisplayNames so it returns display names for active users only. Each display name should contain the user's name and role.
Free with a JS Exercises account
Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.
By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.
Chain Compatible Results
Array methods chain when one method returns the kind of value the next method expects. A filtered array can be mapped because it is still an array.
The order matters. If you need only active users, keep the matching records first, then transform the remaining records into display text.
Your task: Complete activeDisplayNames so it returns display names for active users only. Each display name should contain the user's name and role.