server/app.js
// returns true if userid already exists in the database. Else, returns false
returns true if userid already exists in the database. Else, returns false
returns true if userid already exists in the database . Else returns false
function isDuplicate(accounts, myuserid) {
    for (let i = 0; i < accounts.length; i++) {
        if (myuserid == accounts[i].userid) {
            return true;
        }
    }
    return false;
}
function isDuplicate ( accounts , myuserid ) { for ( let i = 0 ; i < accounts . length ; i ++ ) { if ( myuserid == accounts [ i ] . userid ) { return true ; } } return false ; }
returns true if userid already exists in the database.
returns true if userid already exists in the database .