You are building a user management dashboard for an online community platform. The system stores user information, including their names and addresses.
Your task is to extract the name of the first user and store it in a variable firstUserName
. Then collect the remaining users into an array called remainingUsers
. From the remainingUsers
array, extract the city of each user's address using optional chaining and store these cities in an array called remainingUserCities
.
Update the function processUserData
to implement this functionality and log the extracted values (firstUserName, remainingUsers, and remainingUserCities) to the console.