I'm writing a chat app and a function in it checks if a user is logged in or not. When a user logs in, it writes the ID to an array. I have a use a function that can check if a user is logged in to the server, but as an argument you need to give it a user ID, which are contained in the array.
Here's where I'm stuck - If the functions checks to see if the ID is logged in and it determines its not, it returns a value of "false". I'd like to run all of these through the function one after another. How do I then remove that name from the array?
var loggedInUsers = [];
var user = easyrtc.idToName(i); //converts random digits to assigned ID
loggedInUsers.push(user);
easyrtc.getConnectStatus(???) //Checks if a user is logged in
Thanks!!