Reading Object Properties
Reading Object Properties
JavaScript functions often receive one object instead of several values, so reusable code can read named properties from any matching record.
That contract makes the function reusable for many users, products, or records.
Your task: Write formatMember(member) so it returns a readable summary containing the member's name, role, and active status. The function should work for any object with those three properties and should return the string instead of logging it.
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.
Reading Object Properties
JavaScript functions often receive one object instead of several values, so reusable code can read named properties from any matching record.
That contract makes the function reusable for many users, products, or records.
Your task: Write formatMember(member) so it returns a readable summary containing the member's name, role, and active status. The function should work for any object with those three properties and should return the string instead of logging it.