I have a small chat application. I want to send a message to only the newest or last user to join the chatroom. when I use:
socket.broadcast.emit('chat message');
This (broadcast) does the opposite of what I would like to accomplish. Is there a different built-in function that I can use instead of broadcast? I also tried emit without the broadcast and that sends to everyone. I would appreciate any help. Thansk.