I'm creating a chat application in Node.js using MVC design. I'm confused about whether certain methods should belong to the 'Room' object or the 'User' object. I need these methods:
checkIfUserExists(users_array)
checkIfRoomExists(rooms_array)
If this was C++, I may have created static functions to do this in their respective classes, but I'm not sure what the best practice in Javascript is. Any suggestions?