Show users in a chat room

You can get a list of online users connected to the chat room by calling chat.users . The list is kept in sync as users join and leave the chats.

console.log(chat.users);