function updateList(data) {
    userList.innerHTML = ''

    data.forEach(obj => {
        let me

        if (obj.userName === user) {
            me = 'thisUser'
        } else {
            me = 'user'
        }

        userList.innerHTML += '<div class=' + me + '><p class="username">' + obj.userName + '</p><p class="score">Score: <span>' + obj.score + '</span></p></div>'
    })
}
// ------------------------------------------------------- updates userlist, so scores and users
updates userlist, so scores and users
updates userlist so scores and users
function updateList(data) {
    userList.innerHTML = ''
    data.forEach(obj => {
        let me
        if (obj.userName === user) {
            me = 'thisUser'
        } else {
            me = 'user'
        }
        userList.innerHTML += '<div class=' + me + '><p class="username">' + obj.userName + '</p><p class="score">Score: <span>' + obj.score + '</span></p></div>'
    })
}
function updateList ( data ) { userList . innerHTML = '' data . forEach ( obj => { let me if ( obj . userName === user ) { me = 'thisUser' } else { me = 'user' } userList . innerHTML += '<div class=' + me + '><p class="username">' + obj . userName + '</p><p class="score">Score: <span>' + obj . score + '</span></p></div>' } ) }
updates userlist, so scores and users
updates userlist so scores and users