I'm trying to update number of people connected to the site by changing html element using javascript. For some reason if I set a variable on it, it does not work, but if I do it raw way (w/o variable) it works fine.
var users = document.getElementById('users').innerHTML;
users = connection.users;
↑ Doesn't Work
document.getElementById('users').innerHTML = connection.users;
↑ Works